Skip to content

Commit

Permalink
cd: Upload artifact to workflow artifact storage as well as release
Browse files Browse the repository at this point in the history
This provides a second path to help verify if there are issues with the main upload.
  • Loading branch information
kf6kjg committed Jun 4, 2021
1 parent 5b73bc2 commit a5e8365
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
branches:
- main
- master
- actions # HACK for development purposes.

jobs:
prepare:
Expand Down Expand Up @@ -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"
Expand All @@ -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

0 comments on commit a5e8365

Please sign in to comment.