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

ci: add sha256 checksums #103

Merged
merged 7 commits into from
Oct 6, 2023
Merged
Changes from all 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
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@ jobs:
mv ./target/$TARGET/release/mask ./$NAME/mask
chmod +x ./$NAME/mask
zip -r $NAME.zip $NAME
shasum -a 256 $NAME.zip > $NAME.zip.sha256
- name: Attach the binary to the release
uses: ./.github/actions/attach-release-assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
assets: ./*.zip
- name: Attach the checksums to the release
uses: ./.github/actions/attach-release-assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
assets: ./*.sha256

release-linux-musl:
runs-on: ubuntu-latest
Expand All @@ -48,12 +55,19 @@ jobs:
mv ./target/$TARGET/release/mask ./$NAME/mask
chmod +x ./$NAME/mask
zip -r $NAME.zip $NAME
shasum -a 256 $NAME.zip > $NAME.zip.sha256
- name: Attach the binary to the release
uses: ./.github/actions/attach-release-assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
assets: ./*.zip
- name: Attach the checksums to the release
uses: ./.github/actions/attach-release-assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
assets: ./*.sha256

release-macos-aarch64:
runs-on: macos-latest
Expand Down Expand Up @@ -81,12 +95,18 @@ jobs:
mv ./target/$TARGET/release/mask ./$NAME/mask
chmod +x ./$NAME/mask
zip -r $NAME.zip $NAME
shasum -a 256 $NAME.zip > $NAME.zip.sha256
# NOTE: cannot use the attach-release-assets action because macOS doesn't support docker-based actions.
# Luckily we can just run the bash script directly.
- name: Attach the binary to the release
run: ./.github/actions/attach-release-assets/run.sh ./*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attach the checksums to the release
shell: bash
run: ./.github/actions/attach-release-assets/run.sh ./*.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-macos-x86-64:
runs-on: macos-latest
Expand All @@ -111,12 +131,18 @@ jobs:
mv ./target/$TARGET/release/mask ./$NAME/mask
chmod +x ./$NAME/mask
zip -r $NAME.zip $NAME
shasum -a 256 $NAME.zip > $NAME.zip.sha256
# NOTE: cannot use the attach-release-assets action because macOS doesn't support docker-based actions.
# Luckily we can just run the bash script directly.
- name: Attach the binary to the release
run: ./.github/actions/attach-release-assets/run.sh ./*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attach the checksums to the release
shell: bash
run: ./.github/actions/attach-release-assets/run.sh ./*.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-homebrew:
needs: release-macos-x86-64
Expand Down Expand Up @@ -148,10 +174,16 @@ jobs:
mkdir $NAME
mv ./target/$TARGET/release/mask.exe ./$NAME/mask.exe
7z a $NAME.zip $NAME
certutil -hashfile $NAME.zip sha256 | grep -E [A-Fa-f0-9]{64} > $NAME.zip.sha256
# NOTE: cannot use the attach-release-assets action because windows doesn't support docker-based actions.
# Luckily we can just run the bash script directly.
- name: Attach the binary to the release
shell: bash
run: ./.github/actions/attach-release-assets/run.sh ./*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attach the checksums to the release
shell: bash
run: ./.github/actions/attach-release-assets/run.sh ./*.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading