Skip to content

Commit

Permalink
chore: place tarball in workdir
Browse files Browse the repository at this point in the history
The goal is to improve maintainability, because ``dist/`` was hardcoded
in multiple steps.
  • Loading branch information
rebornplusplus committed Aug 30, 2024
1 parent 8cc0e5c commit b2fa5d5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ jobs:
ARCHIVE_FILE_SHA384="${ARCHIVE_FILE}.sha384"
echo "Creating archive $ARCHIVE_FILE"
mkdir -p dist/build
cp chisel LICENSE README.md dist/build
find dist/build -printf "%P\n" | tar -czf dist/$ARCHIVE_FILE --no-recursion -C dist/build -T -
cd dist/ && sha384sum "${ARCHIVE_FILE}" > "${ARCHIVE_FILE_SHA384}" && cd -
mkdir -p dist/
cp chisel LICENSE README.md dist/
find dist -printf "%P\n" | tar -czf $ARCHIVE_FILE --no-recursion -C dist -T -
sha384sum "${ARCHIVE_FILE}" > "${ARCHIVE_FILE_SHA384}"
# Share variables with subsequent steps
echo "ARCHIVE_FILE=${ARCHIVE_FILE}" >>$GITHUB_OUTPUT
Expand All @@ -106,8 +106,8 @@ jobs:
with:
name: ${{ steps.archive.outputs.ARCHIVE_FILE }}
path: |
dist/${{ steps.archive.outputs.ARCHIVE_FILE }}
dist/${{ steps.archive.outputs.ARCHIVE_FILE_SHA384 }}
${{ steps.archive.outputs.ARCHIVE_FILE }}
${{ steps.archive.outputs.ARCHIVE_FILE_SHA384 }}
- name: Upload archive to release
env:
Expand All @@ -118,5 +118,5 @@ jobs:
if: ${{ github.event_name == 'release' }}
run: |
echo "Uploading $ARCHIVE_FILE to release $CHISEL_VERSION"
gh release upload $CHISEL_VERSION dist/$ARCHIVE_FILE
gh release upload $CHISEL_VERSION dist/$ARCHIVE_FILE_SHA384
gh release upload $CHISEL_VERSION $ARCHIVE_FILE
gh release upload $CHISEL_VERSION $ARCHIVE_FILE_SHA384

0 comments on commit b2fa5d5

Please sign in to comment.