Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Dextinfire committed Sep 8, 2024
1 parent cd97c23 commit 1fc08d4
Showing 1 changed file with 26 additions and 29 deletions.
55 changes: 26 additions & 29 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- "*"
- "!separate_renderer"

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
get_version:
name: Get Version
Expand Down Expand Up @@ -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 }}
Expand All @@ -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:
Expand All @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 1fc08d4

Please sign in to comment.