✨ ISM (#8) #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
artifact: | |
permissions: | |
contents: write | |
pull-requests: write | |
name: artifact | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./contracts | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: software-mansion/setup-scarb@v1 | |
- name: Build contracts | |
working-directory: ${{ env.working-directory}} | |
run: scarb build | |
- name: Archive contracts | |
working-directory: ${{ env.working-directory}} | |
run: | | |
mkdir -p filtered_artifacts | |
find ./target/dev -type f -name '*.contract_class.json' -exec cp {} filtered_artifacts/ \; | |
- name: Generate checksums | |
working-directory: ${{ env.working-directory}} | |
run: | | |
cd filtered_artifacts | |
for file in *; do | |
sha256sum "$file" > "$file.sha256" | |
md5sum "$file" > "$file.md5" | |
done | |
- name: Build artifact zip | |
working-directory: ${{ env.working-directory}} | |
run: | | |
cd filtered_artifacts | |
zip -r ../hyperlane-starknet-${{ github.ref_name }}.zip . | |
cd .. | |
sha256sum hyperlane-starknet-${{ github.ref_name }}.zip > hyperlane-starknet-${{ github.ref_name }}.CHECKSUM | |
md5sum hyperlane-starknet-${{ github.ref_name }}.zip > hyperlane-starknet-${{ github.ref_name }}.CHECKSUM.MD5 | |
- name: Find zip files | |
working-directory: ${{ env.working-directory}} | |
run: | | |
find ./filtered_artifacts -type f -name '*.zip' -exec echo "::set-output name=zip_files::{}" \; | |
id: find_zip_files | |
- name: Release Artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./contracts/hyperlane-starknet-${{ github.ref_name }}.zip | |
./contracts/hyperlane-starknet-${{ github.ref_name }}.CHECKSUM | |
./contracts/hyperlane-starknet-${{ github.ref_name }}.CHECKSUM.MD5 | |