From a5e83656043e1c57f0a1612ad7109fcca9414a14 Mon Sep 17 00:00:00 2001 From: Ricky C Date: Thu, 3 Jun 2021 17:22:36 -0700 Subject: [PATCH] cd: Upload artifact to workflow artifact storage as well as release This provides a second path to help verify if there are issues with the main upload. --- .github/workflows/cd.yaml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index d7b1106e..7a47d480 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -12,7 +12,6 @@ on: branches: - main - master - - actions # HACK for development purposes. jobs: prepare: @@ -272,9 +271,8 @@ jobs: ; shell: bash - - name: Upload release build - env: - RELEASE_INFO: ${{ needs.prepare.outputs.releaseInfo }} + - name: Build release artifacts + id: artifacts run: | releaseBin='halcyon-${{ needs.prepare.outputs.version }}-'"${GITHUB_REF#refs/heads/}"'-${{ runner.os }}' mv bin "$releaseBin" @@ -289,5 +287,26 @@ jobs: tar cfJ "$artifactPath" "$releaseBin" fi - "$(npm bin)/ts-node-script" -- ./.github/scripts/cd/upload_release_artifact.ts "$artifactPath" "$artifactMimeType" '${{ secrets.GITHUB_TOKEN }}' + echo "artifactPath=$artifactPath"; echo "::set-output name=artifactPath::$artifactPath" + echo "artifactMimeType=$artifactMimeType"; echo "::set-output name=artifactMimeType::$artifactMimeType" + echo "releaseBin=$releaseBin"; echo "::set-output name=releaseBin::$releaseBin" + shell: bash + + - name: Upload artifacts to workflow run for diagnostic testing + uses: actions/upload-artifact@v2.2.3 + with: + name: ${{ steps.artifacts.outputs.releaseBin }} + path: ${{ steps.artifacts.outputs.releaseBin }} + retention-days: 7 + + - name: Upload artifacts to release + env: + RELEASE_INFO: ${{ needs.prepare.outputs.releaseInfo }} + run: | + "$(npm bin)/ts-node-script" -- \ + ./.github/scripts/cd/upload_release_artifact.ts \ + '${{ steps.artifacts.outputs.artifactPath }}' \ + '${{ steps.artifacts.outputs.artifactMimeType }}' \ + '${{ secrets.GITHUB_TOKEN }}' \ + ; shell: bash