Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: publish release checksums #155

Merged
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,34 @@ jobs:
CHISEL_VERSION: ${{ steps.build.outputs.CHISEL_VERSION }}
run: |
ARCHIVE_FILE=chisel_${CHISEL_VERSION}_${GOOS}_${GOARCH}.tar.gz
ARCHIVE_FILE_CKSUM="${ARCHIVE_FILE}.sha384"
rebornplusplus marked this conversation as resolved.
Show resolved Hide resolved
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_CKSUM}" && cd -

# Share variables with subsequent steps
echo "ARCHIVE_FILE=${ARCHIVE_FILE}" >>$GITHUB_OUTPUT
echo "ARCHIVE_FILE_CKSUM=${ARCHIVE_FILE_CKSUM}" >>$GITHUB_OUTPUT
rebornplusplus marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload archive as Actions artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.archive.outputs.ARCHIVE_FILE }}
path: dist/${{ steps.archive.outputs.ARCHIVE_FILE }}
path: |
dist/${{ steps.archive.outputs.ARCHIVE_FILE }}
dist/${{ steps.archive.outputs.ARCHIVE_FILE_CKSUM }}

- name: Upload archive to release
env:
CHISEL_VERSION: ${{ steps.build.outputs.CHISEL_VERSION }}
ARCHIVE_FILE: ${{ steps.archive.outputs.ARCHIVE_FILE }}
ARCHIVE_FILE_CKSUM: ${{ steps.archive.outputs.ARCHIVE_FILE_CKSUM }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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_CKSUM
Loading