-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dextinfire
committed
Sep 8, 2024
1 parent
cd97c23
commit 1fc08d4
Showing
1 changed file
with
26 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ on: | |
- "*" | ||
- "!separate_renderer" | ||
|
||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
get_version: | ||
name: Get Version | ||
|
@@ -103,10 +106,10 @@ jobs: | |
- name: Archive Artifacts | ||
run: | | ||
7z u impacto-${{ matrix.os_name }}-${{ needs.get_version.outputs.version }}-${{ github.sha }}.zip release/ci-release/* | ||
# if: startsWith(github.ref, 'refs/tags') || (github.ref == 'refs/heads/master') | ||
if: startsWith(github.ref, 'refs/tags') || (github.ref == 'refs/heads/master') | ||
- name: Upload Artifact | ||
uses: actions/[email protected] | ||
# if: startsWith(github.ref, 'refs/tags') || (github.ref == 'refs/heads/master') | ||
if: startsWith(github.ref, 'refs/tags') || (github.ref == 'refs/heads/master') | ||
with: | ||
path: impacto-${{ matrix.os_name }}-${{ needs.get_version.outputs.version }}-${{ github.sha }}.zip | ||
name: release-${{ matrix.os_name }} | ||
|
@@ -115,13 +118,10 @@ jobs: | |
publish_artifacts: | ||
name: Publish Artifacts | ||
runs-on: ubuntu-22.04 | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
needs: | ||
- get_version | ||
- job-matrix | ||
# if: ${{needs.job-matrix.result}} == "success" && startsWith(github.ref, 'refs/tags') || (github.ref == 'refs/heads/master') | ||
if: ((${{needs.job-matrix.result}} == "success")) | ||
if: ${{needs.job-matrix.result}} == "success" && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -130,45 +130,42 @@ jobs: | |
merge-multiple: true | ||
- name: Upload Release | ||
uses: softprops/action-gh-release@v2 | ||
# if: startsWith(github.ref, 'refs/tags') || (github.ref == 'refs/heads/master') | ||
if: startsWith(github.ref, 'refs/tags') || (github.ref == 'refs/heads/master') | ||
with: | ||
Name: Latest ${{ env.BRANCH_NAME }} build | ||
tag_name: ${{ needs.get_version.outputs.version }} | ||
files: | ||
${{ github.workspace }}/release/*.zip | ||
make_latest: true | ||
isprerelease: true | ||
prerelease: true | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true | ||
- name: Get current date | ||
id: date | ||
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | ||
|
||
- uses: tsickert/[email protected] | ||
with: | ||
webhook-id: ${{ secrets.discordChannelId }} | ||
webhook-url: ${{ secrets.discordWebhookKey }} | ||
username: IMPACTO | ||
avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png | ||
embed-title : "${{ github.event.commits[0].author.name }}" | ||
embed-color: 3659647 | ||
embed-timestamp: ${{ env.NOW }} | ||
embed-description: > | ||
"Commit\n | ||
`${{ github.event.head_commit.message }} (${{ github.sha }})`\n | ||
from branch `${{ env.BRANCH_NAME }}` has been successfully built.\n\n | ||
Release URL:\n | ||
https://github.com/CommitteeOfZero/impacto/releases/tag/${{ needs.get_version.outputs.version }}\n\n | ||
Details:\n | ||
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
# - uses: tsickert/[email protected] | ||
# with: | ||
# thread-id: ${{ secrets.discordChannelId }} | ||
# webhook-url: ${{ secrets.discordWebhookKey }} | ||
# username: IMPACTO | ||
# avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png | ||
# embed-title : "${{ github.event.commits[0].author.name }}" | ||
# embed-color: 3659647 | ||
# embed-timestamp: ${{ env.NOW }} | ||
# embed-description: > | ||
# "Commit\n | ||
# `${{ github.event.head_commit.message }} (${{ github.sha }})`\n | ||
# from branch `${{ env.BRANCH_NAME }}` has been successfully built.\n\n | ||
# Release URL:\n | ||
# https://github.com/CommitteeOfZero/impacto/releases/tag/${{ needs.get_version.outputs.version }}\n\n | ||
# Details:\n | ||
# ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
notify_fail: | ||
name: Notify failure | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- job-matrix | ||
if: always() && contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Get Jobs Status' | ||
|
@@ -191,7 +188,7 @@ jobs: | |
|
||
# - uses: tsickert/[email protected] | ||
# with: | ||
# webhook-id: ${{ secrets.discordChannelId }} | ||
# thread-id: ${{ secrets.discordChannelId }} | ||
# webhook-url: ${{ secrets.discordWebhookKey }} | ||
# username: IMPACTO | ||
# avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png | ||
|