Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix contract artifact upload #315

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/*