Skip to content

Commit

Permalink
fix: filter artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
JordyRo1 committed May 6, 2024
1 parent bf24594 commit 1df7a37
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,41 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
- name: Build contracts
run: scarb build
- name: Archive contracts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: ./target/dev
run: |
mkdir -p filtered_artifacts
find ./target/dev -type f -name '*.contract_class.json' -exec cp {} filtered_artifacts/ \;
- name: Generate checksums
run: |
cd ./target/dev
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 ../artifacts.zip .
cd ..
sha256sum artifacts.zip > artifacts.zip.sha256
md5sum artifacts.zip > artifacts.zip.md5
release:
needs: artifact
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: artifacts
path: ./target/dev
name: filtered_artifacts
path: ./filtered_artifacts

- name: Release Artifact
uses: softprops/action-gh-release@v1
with:
files: |
./target/dev/*
filtered_artifacts/*
tag_name: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1df7a37

Please sign in to comment.