From 1e9131455c9596110ba28f8c6bbefeb462da6524 Mon Sep 17 00:00:00 2001 From: WhenGryphonsFly <84215159+WhenGryphonsFly@users.noreply.github.com> Date: Thu, 17 Aug 2023 20:05:02 -0500 Subject: [PATCH 1/2] Update build.yml --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fe42dff..3404979e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,12 +9,18 @@ on: # Therefore, if you update this, make sure to update the deploy job below. env: IS_DEPLOY: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + SHORT_HASH: ${{ $GITHUB_SHA | cut -c1-8 }} jobs: build: runs-on: ubuntu-latest steps: - + - name: Echo + run: echo ${{ SHORT_HASH }} + + - name: Fail + uses: cutenode/action-always-fail@v1.0.0 + - name: Checkout uses: actions/checkout@main @@ -49,10 +55,14 @@ jobs: deploy: runs-on: ubuntu-latest + needs: build if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} steps: - name: Update release - uses: johnwbyrd/update-release@v1.0.0 + uses: ncipollo/release-action@v1 with: + artifactErrorsFailBuild: true + artifacts: agbcc.tar.gz + commit: env.SHORT_HASH + tag: env.SHORT_HASH token: ${{ secrets.GITHUB_TOKEN }} # Automatically created by the workflow with a lifetime of one hour - files: agbcc.tar.gz From 332e8d43cad31766ed6f225661aab32d3271809d Mon Sep 17 00:00:00 2001 From: WhenGryphonsFly <84215159+WhenGryphonsFly@users.noreply.github.com> Date: Thu, 17 Aug 2023 20:22:31 -0500 Subject: [PATCH 2/2] Update build.yml --- .github/workflows/build.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3404979e..5fafcff2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,18 +9,12 @@ on: # Therefore, if you update this, make sure to update the deploy job below. env: IS_DEPLOY: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - SHORT_HASH: ${{ $GITHUB_SHA | cut -c1-8 }} jobs: build: runs-on: ubuntu-latest steps: - - name: Echo - run: echo ${{ SHORT_HASH }} - - - name: Fail - uses: cutenode/action-always-fail@v1.0.0 - + - name: Checkout uses: actions/checkout@main @@ -63,6 +57,6 @@ jobs: with: artifactErrorsFailBuild: true artifacts: agbcc.tar.gz - commit: env.SHORT_HASH - tag: env.SHORT_HASH + commit: github.sha + tag: github.sha token: ${{ secrets.GITHUB_TOKEN }} # Automatically created by the workflow with a lifetime of one hour