Skip to content

Commit 91eb6e7

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/zksolc-link
2 parents b41be0d + 62af6f9 commit 91eb6e7

File tree

16 files changed

+450
-127
lines changed

16 files changed

+450
-127
lines changed

.github/workflows/release-please.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ jobs:
3838
uses: ./.github/workflows/release.yml
3939
with:
4040
tag: ${{ needs.release-please.outputs.tag_name }}
41+
version: ${{ (needs.release-please.outputs.tag_name && format('{0}.{1}.{2}', needs.release-please.outputs.major, needs.release-please.outputs.minor, needs.release-please.outputs.patch)) || ''}}
4142
secrets: inherit

.github/workflows/release.yml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ on:
88
workflow_call:
99
inputs:
1010
tag:
11-
description: "Tag to use for the release."
11+
description: "Tag to use for the release (<component>-v<version>)."
12+
type: string
13+
required: true
14+
default: ""
15+
version:
16+
description: "Version for the release."
1217
type: string
1318
required: true
1419
default: ""
@@ -24,6 +29,7 @@ jobs:
2429
timeout-minutes: 30
2530
outputs:
2631
tag_name: ${{ steps.release_info.outputs.tag_name }}
32+
version_name: ${{ steps.release_info.outputs.version_name }}
2733
release_name: ${{ steps.release_info.outputs.release_name }}
2834
prerelease: ${{ steps.release_info.outputs.prerelease }}
2935
changelog: ${{ steps.build_changelog.outputs.changelog || '' }}
@@ -36,21 +42,37 @@ jobs:
3642
- name: Compute release name and tag
3743
id: release_info
3844
run: |
39-
if [[ $IS_NIGHTLY ]]; then
40-
echo "tag_name=nightly-${GITHUB_SHA}" >> $GITHUB_OUTPUT
45+
echo "nightly: $IS_NIGHTLY"
46+
if [ $IS_NIGHTLY == "true" ]; then
47+
TAG="${{ inputs.tag || format('nightly-{0}', github.sha) }}"
48+
VERSION="${{ inputs.version || 'nightly' }}"
49+
50+
echo "tag_name=${TAG}" >> $GITHUB_OUTPUT
51+
echo "version_name=${VERSION}" >> $GITHUB_OUTPUT
4152
echo "release_name=foundry-zksync Nightly ($(date '+%Y-%m-%d'))" >> $GITHUB_OUTPUT
4253
echo "prerelease=true" >> $GITHUB_OUTPUT
4354
else
44-
echo "tag_name=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
45-
echo "release_name=foundry-zksync@${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
55+
TAG="${{ inputs.tag || format('stable-{0}', github.sha) }}"
56+
VERSION="${{ inputs.version || 'stable' }}"
57+
58+
echo "tag_name=${TAG}" >> $GITHUB_OUTPUT
59+
echo "version_name=v${VERSION}" >> $GITHUB_OUTPUT
60+
echo "release_name=foundry-zksync v${VERSION}" >> $GITHUB_OUTPUT
4661
echo "prerelease=false" >> $GITHUB_OUTPUT
4762
fi
63+
64+
- name: Print release info
65+
run: |
66+
echo tag_name: "${{ steps.release_info.outputs.tag_name }}"
67+
echo version_name: "${{ steps.release_info.outputs.version_name }}"
68+
echo release_name: "${{ steps.release_info.outputs.release_name }}"
69+
echo prerelease: "${{ steps.release_info.outputs.prerelease }}"
4870
4971
# Creates a `nightly-SHA` tag for this specific nightly
5072
# This tag is used for this specific nightly version's release
5173
# which allows users to roll back. It is also used to build
5274
# the changelog.
53-
- name: Create build-specific nightly tag
75+
- name: Create build-specific tag (nightly)
5476
if: ${{ env.IS_NIGHTLY == 'true' }}
5577
uses: actions/github-script@v7
5678
env:
@@ -60,7 +82,7 @@ jobs:
6082
const createTag = require('./.github/scripts/create-tag.js')
6183
await createTag({ github, context }, process.env.TAG_NAME)
6284
63-
- name: Build changelog
85+
- name: Build changelog (nightly)
6486
if: ${{ env.IS_NIGHTLY == 'true' }}
6587
id: build_changelog
6688
uses: mikepenz/release-changelog-builder-action@v4
@@ -163,17 +185,17 @@ jobs:
163185
PLATFORM_NAME: ${{ matrix.platform }}
164186
TARGET: ${{ matrix.target }}
165187
ARCH: ${{ matrix.arch }}
166-
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
188+
VERSION_NAME: ${{ needs.prepare.outputs.version_name }}
167189
shell: bash
168190
run: |
169191
if [ "$PLATFORM_NAME" == "linux" ]; then
170-
tar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast
171-
echo "file_name=foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
192+
tar -czvf "foundry_zksync_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast
193+
echo "file_name=foundry_zksync_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
172194
elif [ "$PLATFORM_NAME" == "darwin" ]; then
173195
# We need to use gtar here otherwise the archive is corrupt.
174196
# See: https://github.com/actions/virtual-environments/issues/2619
175-
gtar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast
176-
echo "file_name=foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
197+
gtar -czvf "foundry_zksync_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast
198+
echo "file_name=foundry_zksync_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
177199
fi
178200
179201
- name: Build man page
@@ -182,7 +204,7 @@ jobs:
182204
env:
183205
PLATFORM_NAME: ${{ matrix.platform }}
184206
TARGET: ${{ matrix.target }}
185-
VERSION_NAME: ${{ (env.IS_NIGHTLY == 'true' && 'nightly') || needs.prepare.outputs.tag_name }}
207+
VERSION_NAME: ${{ needs.prepare.outputs.version_name }}
186208
shell: bash
187209
run: |
188210
sudo apt-get -y install help2man

0 commit comments

Comments
 (0)