diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93b800b..dd98c94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,15 +18,15 @@ jobs: - uses: actions/checkout@v4 - uses: software-mansion/setup-scarb@v1 - name: Build contracts - working-directory: ./contracts + working-directory: ${{ env.working-directory}} run: scarb build - name: Archive contracts - working-directory: ./contracts + working-directory: ${{ env.working-directory}} run: | mkdir -p filtered_artifacts find ./contracts/target/dev -type f -name '*.contract_class.json' -exec cp {} filtered_artifacts/ \; - name: Generate checksums - working-directory: ./contracts + working-directory: ${{ env.working-directory}} run: | cd filtered_artifacts for file in *; do @@ -34,7 +34,7 @@ jobs: md5sum "$file" > "$file.md5" done - name: Build artifact zip - working-directory: ./contracts + working-directory: ${{ env.working-directory}} run: | cd filtered_artifacts zip -r ../hyperlane-starknet-${{ github.ref_name }}.zip . @@ -43,13 +43,13 @@ jobs: md5sum hyperlane-starknet-${{ github.ref_name }}.zip > hyperlane-starknet-${{ github.ref_name }}.CHECKSUM.MD5 - name: Find zip files - working-directory: ./contracts + 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 - working-directory: ./contracts + working-directory: ${{ env.working-directory}} uses: softprops/action-gh-release@v1 with: files: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa3c584..9eb65e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,15 +3,17 @@ on: push: pull_request: jobs: + env: + working-directory: ./contracts check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: software-mansion/setup-scarb@v1 - uses: foundry-rs/setup-snfoundry@v3 - - working-directory: ./contracts + - working-directory: ${{ env.working-directory}} run: scarb fmt --check - - working-directory: ./contracts + - working-directory: ${{ env.working-directory}} run: scarb build - - working-directory: ./contracts + - working-directory: ${{ env.working-directory}} run: snforge test \ No newline at end of file