From 36ea578aa5a3cb43a2aa518ed0d8fb090d26f13a Mon Sep 17 00:00:00 2001 From: Maksym Kryva Date: Wed, 10 Jan 2024 15:49:23 +0200 Subject: [PATCH 1/3] ci: prepare workflow for release contracts --- .github/workflows/buld-release.yaml | 35 ++++++++++++++++++++++ .github/workflows/l1-contracts-ci.yaml | 4 --- .github/workflows/l2-contracts-ci.yaml | 4 --- .github/workflows/system-contracts-ci.yaml | 4 --- 4 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/buld-release.yaml diff --git a/.github/workflows/buld-release.yaml b/.github/workflows/buld-release.yaml new file mode 100644 index 000000000..155fbefbf --- /dev/null +++ b/.github/workflows/buld-release.yaml @@ -0,0 +1,35 @@ +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: Install dependencies + run: yarn + + - 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 diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index cee8930f9..394eabaef 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -2,10 +2,6 @@ name: L1 contracts CI on: pull_request: - push: - branches: - - dev - - main jobs: build: diff --git a/.github/workflows/l2-contracts-ci.yaml b/.github/workflows/l2-contracts-ci.yaml index f40b3c2e6..e99569393 100644 --- a/.github/workflows/l2-contracts-ci.yaml +++ b/.github/workflows/l2-contracts-ci.yaml @@ -2,10 +2,6 @@ name: L2 contracts CI on: pull_request: - push: - branches: - - dev - - main jobs: build: diff --git a/.github/workflows/system-contracts-ci.yaml b/.github/workflows/system-contracts-ci.yaml index 6dacf61ea..50bf407d2 100644 --- a/.github/workflows/system-contracts-ci.yaml +++ b/.github/workflows/system-contracts-ci.yaml @@ -2,10 +2,6 @@ name: System contracts CI on: pull_request: - push: - branches: - - dev - - main jobs: build: From 863cfe975ec5a85935e9e491874c133880d1a98c Mon Sep 17 00:00:00 2001 From: Maksym Kryva Date: Wed, 10 Jan 2024 16:17:59 +0200 Subject: [PATCH 2/3] ci: prepare workflow for release contracts --- .github/workflows/buld-release.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buld-release.yaml b/.github/workflows/buld-release.yaml index 155fbefbf..565983a76 100644 --- a/.github/workflows/buld-release.yaml +++ b/.github/workflows/buld-release.yaml @@ -19,8 +19,11 @@ jobs: node-version: 18.18.0 cache: yarn - - name: Install dependencies - run: 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: | @@ -33,3 +36,13 @@ jobs: 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 + files: | + l1-contracts.tar.gz + l2-contracts.tar.gz + system-contracts.tar.gz From 0a88056437ba0d0586484cbe1627e0e39852ffad Mon Sep 17 00:00:00 2001 From: Maksym Kryva Date: Wed, 10 Jan 2024 16:23:13 +0200 Subject: [PATCH 3/3] ci: prepare workflow for release contracts --- .github/workflows/buld-release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/buld-release.yaml b/.github/workflows/buld-release.yaml index 565983a76..a3426a059 100644 --- a/.github/workflows/buld-release.yaml +++ b/.github/workflows/buld-release.yaml @@ -42,6 +42,8 @@ jobs: 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