Skip to content

Commit f1bc1a4

Browse files
authored
fix: Create contract artifacts and add them to releases (matter-labs#1630)
1 parent 5407621 commit f1bc1a4

File tree

4 files changed

+26
-16
lines changed

4 files changed

+26
-16
lines changed

.github/workflows/build-release.yaml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
name: Build and release(manual)
1+
name: Build and release(manual & tags)
22

33
on:
44
workflow_dispatch:
55
inputs:
6-
commit:
6+
tag:
77
type: string
8-
description: SHA commit for build
9-
required: false
10-
prefix:
11-
type: string
12-
description: Prefix for release name
13-
required: false
14-
default: manual
8+
description: tag to build from
9+
required: true
10+
create:
11+
tags:
12+
- "v*" # for main releases
13+
- "zkos*" # for zk releases
1514

1615
permissions:
1716
contents: write
@@ -21,10 +20,21 @@ jobs:
2120
runs-on: ubuntu-latest
2221

2322
steps:
23+
- name: Resolve tag
24+
id: vars
25+
run: |
26+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
27+
echo "TAG=${{ inputs.tag }}" >> $GITHUB_OUTPUT
28+
else
29+
# For push/create on a tag, github.ref looks like 'refs/tags/<tag>'
30+
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
31+
fi
32+
echo "Resolved TAG=${{ steps.vars.outputs.TAG }}"
33+
2434
- name: Checkout the repository
2535
uses: actions/checkout@v4
2636
with:
27-
ref: ${{ inputs.commit }}
37+
ref: ${{ steps.vars.outputs.TAG }}
2838
submodules: recursive
2939

3040
- name: Install foundry-zksync
@@ -45,7 +55,6 @@ jobs:
4555
id: init
4656
run: |
4757
yarn
48-
echo "release_tag=${{ inputs.prefix }}-${{ inputs.commit }}" >> $GITHUB_OUTPUT
4958
5059
- name: Build l1 contracts
5160
working-directory: l1-contracts
@@ -70,12 +79,10 @@ jobs:
7079
tar -czvf system-contracts.tar.gz ./system-contracts
7180
7281
- name: Release
73-
uses: softprops/action-gh-release@v1
82+
uses: softprops/action-gh-release@v2
7483
with:
75-
tag_name: ${{ steps.init.outputs.release_tag }}
84+
tag_name: ${{ steps.vars.outputs.TAG }}
7685
fail_on_unmatched_files: true
77-
target_commitish: ${{ inputs.commit }}
78-
body: ""
7986
files: |
8087
l1-contracts.tar.gz
8188
l2-contracts.tar.gz

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ l1-contracts/test/foundry/l1/integration/deploy-scripts/script-config/config-dep
3535
l1-contracts/test/foundry/integration/deploy-scripts/script-out/*
3636
l1-contracts/test/foundry/l1/integration/upgrade-envs/script-out/*.toml
3737
l1-contracts/zkout/*
38+
.lycheecache

_typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ extend-exclude = [
1616
"*.json",
1717
"*.lock",
1818
".git/",
19+
# Typo inside (unaccessible vs inaccessible) fix before v30.
20+
"/system-contracts/contracts/abstract/SystemContractBase.sol",
1921
"SECURITY.md"
2022
]
2123

docs/evm_emulation/technical_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Additionally EVM contracts can be deployed from EraVM environment using **system
4444
- `createEVM` - `CREATE`-like behavior
4545
- `create2EVM` - `CREATE2`-like behavior
4646

47-
They use the same address derivation schemes as corresponding EVM opcodes. To derive the deployed contract’s address for EOAs we use the main nonce for this operation, while for contracts we use their deployment nonce. You can read more about the two types of nonces in the [NonceHolder system contract’s documentation](https://docs.zksync.io/build/developer-reference/era-contracts/system-contracts#nonceholder).
47+
They use the same address derivation schemes as corresponding EVM opcodes. To derive the deployed contract’s address for EOAs we use the main nonce for this operation, while for contracts we use their deployment nonce. You can read more about the two types of nonces in the [NonceHolder system contract’s documentation](https://docs.zksync.io/zksync-protocol/contracts/system-contracts#nonceholder).
4848

4949
❗ Note, that these two functions are not used (and can’t be used!) from the EVM environment. EVM smart contracts can’t perform **system** calls. EVM opcodes `CREATE` and `CREATE2` should be used instead.
5050

0 commit comments

Comments
 (0)