Skip to content

Commit

Permalink
ci: add checksum for binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
dj95 committed Dec 25, 2024
1 parent f7c3fd9 commit 8423b97
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ jobs:
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}

- name: Create checksum
id: checksum
working-directory: ./target/${{ matrix.target }}/release
run: |
name="kdl-fmt.${{ matrix.target }}.sha256sum"
if [[ "$RUNNER_OS" != "macOS" ]]; then
sha256sum "kdl-fmt" > "${name}"
else
shasum -a 256 "kdl-fmt" > "${name}"
fi
echo "name=${name}" >> $GITHUB_OUTPUT
- name: Archive binary
id: archive-binary
working-directory: ./target/${{ matrix.target }}/release
Expand All @@ -101,4 +113,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
files: ./target/${{ matrix.target }}/release/${{ steps.archive-binary.outputs.name }}
files: |
./target/${{ matrix.target }}/release/${{ steps.archive-binary.outputs.name }}
./target/${{ matrix.target }}/release/${{ steps.checksum.outputs.name }}

0 comments on commit 8423b97

Please sign in to comment.