fix: working dir #7
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: | ||
env: | ||
working-directory: ./contracts | ||
artifact: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
name: artifact | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: software-mansion/setup-scarb@v1 | ||
- name: Build contracts | ||
run: scarb build | ||
- name: Archive contracts | ||
run: | | ||
mkdir -p filtered_artifacts | ||
find ./contracts/target/dev -type f -name '*.contract_class.json' -exec cp {} filtered_artifacts/ \; | ||
- name: Generate checksums | ||
run: | | ||
cd filtered_artifacts | ||
for file in *; do | ||
sha256sum "$file" > "$file.sha256" | ||
md5sum "$file" > "$file.md5" | ||
done | ||
- name: Build artifact zip | ||
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 | ||
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: | | ||
hyperlane-starknet-${{ github.ref_name }}.zip | ||
hyperlane-starknet-${{ github.ref_name }}.CHECKSUM | ||
hyperlane-starknet-${{ github.ref_name }}.CHECKSUM.MD5 | ||