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: prepare workflow for release contracts #163

Merged
merged 3 commits into from
Jan 10, 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
50 changes: 50 additions & 0 deletions .github/workflows/buld-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and release

on:
push:
branches:
- '*'

jobs:
build-contracts:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn

- name: Init
id: init
run: |
yarn
echo "release_tag=$(echo ${GITHUB_REF#refs/heads/})-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build contracts
run: |
yarn l1 build
yarn l2 build
yarn sc build

- name: Prepare artifacts
run: |
tar -czvf l1-contracts.tar.gz ./l1-contracts
tar -czvf l2-contracts.tar.gz ./l2-contracts
tar -czvf system-contracts.tar.gz ./system-contracts

- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.init.outputs.release_tag }}
fail_on_unmatched_files: true
draft: true
body: ""
files: |
l1-contracts.tar.gz
l2-contracts.tar.gz
system-contracts.tar.gz
4 changes: 0 additions & 4 deletions .github/workflows/l1-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: L1 contracts CI

on:
pull_request:
push:
branches:
- dev
- main

jobs:
build:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/l2-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: L2 contracts CI

on:
pull_request:
push:
branches:
- dev
- main

jobs:
build:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/system-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: System contracts CI

on:
pull_request:
push:
branches:
- dev
- main

jobs:
build:
Expand Down
Loading