diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index a5dccaf60e..4d740a84ea 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -38,5 +38,4 @@ jobs: uses: ./.github/workflows/release.yml with: tag: ${{ needs.release-please.outputs.tag_name }} - 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)) || ''}} secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf3da5be67..43963c1da0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,11 +12,6 @@ on: type: string required: true default: "" - version: - description: "Version for the release." - type: string - required: true - default: "" env: CARGO_TERM_COLOR: always @@ -43,21 +38,31 @@ jobs: id: release_info run: | echo "nightly: $IS_NIGHTLY" - if [ $IS_NIGHTLY == "true" ]; then - TAG="${{ inputs.tag || format('nightly-{0}', github.sha) }}" - VERSION="${{ inputs.version || 'nightly' }}" + if [ $IS_NIGHTLY == "true" ]; then + if [ "${{inputs.tag}}" ]; then + TAG="${{ inputs.tag }}" + VERSION="${TAG#foundry-zksync-}" + else + TAG="${{ format('nightly-{0}', github.sha) }}" + VERSION=nightly + fi echo "tag_name=${TAG}" >> $GITHUB_OUTPUT echo "version_name=${VERSION}" >> $GITHUB_OUTPUT echo "release_name=foundry-zksync Nightly ($(date '+%Y-%m-%d'))" >> $GITHUB_OUTPUT echo "prerelease=true" >> $GITHUB_OUTPUT else - TAG="${{ inputs.tag || format('stable-{0}', github.sha) }}" - VERSION="${{ inputs.version || 'stable' }}" + if [ "${{inputs.tag}}" ]; then + TAG="${{ inputs.tag }}" + VERSION="${TAG#foundry-zksync-}" + else + TAG="${{ format('stable-{0}', github.sha) }}" + VERSION=stable + fi echo "tag_name=${TAG}" >> $GITHUB_OUTPUT - echo "version_name=v${VERSION}" >> $GITHUB_OUTPUT - echo "release_name=foundry-zksync v${VERSION}" >> $GITHUB_OUTPUT + echo "version_name=${VERSION}" >> $GITHUB_OUTPUT + echo "release_name=foundry-zksync ${VERSION}" >> $GITHUB_OUTPUT echo "prerelease=false" >> $GITHUB_OUTPUT fi