Skip to content

Commit

Permalink
ci: fix contract artifact upload
Browse files Browse the repository at this point in the history
  • Loading branch information
guidanoli committed Oct 18, 2024
1 parent 23c4c17 commit 4f0355f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 28 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,6 @@ jobs:
id: get_version
run: jq -r '"version=\(.version)"' package.json >> "$GITHUB_OUTPUT"

upload_contract_artifacts_to_gh_releases:
name: Upload contract artifacts to GitHub Releases
needs: version_or_publish
if: ${{ needs.version_or_publish.outputs.published == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: ./.github/workflows/setup

- name: Build contracts
run: pnpm build

- name: Create upload folder
run: mkdir -p upload

- name: Compress contract artifacts
run: tar -czf "$FILEPATH" -C export/artifacts/contracts .
env:
FILEPATH: upload/rollups-contracts-${{ needs.version_or_publish.outputs.version }}-artifacts.tar.gz

- name: Upload files to GitHub Releases
uses: softprops/action-gh-release@v2
with:
files: upload/*

rust_bindings:
name: Generate and publish Rust bindings
needs: version_or_publish
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/upload-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Upload artifacts

on:
push:
tags:
- v*

jobs:
upload:
name: Upload contract artifacts to GitHub Releases
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: ./.github/workflows/setup

- name: Build contracts
run: pnpm build

- name: Create upload folder
run: mkdir -p upload

- name: Extract version from tag
id: extract_version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Compress contract artifacts
run: tar -czf "$FILEPATH" -C export/artifacts/contracts .
env:
FILEPATH: upload/rollups-contracts-${{ steps.extract_version.outputs.version }}-artifacts.tar.gz

- name: Upload files to GitHub Releases
uses: softprops/action-gh-release@v2
with:
files: upload/*

0 comments on commit 4f0355f

Please sign in to comment.