From 0267415126c8aa2579e6cafe447e746809c340e4 Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Wed, 10 Apr 2024 13:56:05 +0200 Subject: [PATCH] chore: avoid latest on maintenance releases (#7702) * chore: avoid latest on maintenance releases * update semantic --------- Co-authored-by: Livio Spring --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ .github/workflows/version.yml | 1 + .releaserc.js | 1 + 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a56b2ed11..5a0d6e52a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: version: uses: ./.github/workflows/version.yml with: - semantic_version: "19.0.2" + semantic_version: "23.0.7" dry_run: true compile: @@ -94,6 +94,6 @@ jobs: APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} with: build_image_name: ${{ needs.container.outputs.build_image }} - semantic_version: "19.0.2" + semantic_version: "23.0.7" image_name: "ghcr.io/zitadel/zitadel" google_image_name: "europe-docker.pkg.dev/zitadel-common/zitadel-repo/zitadel" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 063623b3d..c3b8566ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,33 @@ jobs: semantic_version: ${{ inputs.semantic_version }} dry_run: false + # TODO: remove the publish job and publish releases directly with the @semantic-release/github plugin (remove draftRelease: true) + # as soon as it supports configuring the create release payload property make_latest to "legacy" + # https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release--parameters + publish: + runs-on: ubuntu-22.04 + needs: [ version ] + steps: + - id: get_release + uses: cardinalby/git-get-release-action@v1 + with: + commitSha: ${{ github.sha }} + draft: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish Release + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.repos.updateRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: ${{ steps.get_release.outputs.id }}, + draft: false, + make_latest: "legacy" + }); + docker: runs-on: ubuntu-22.04 needs: [ version ] diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index a3cd30465..cf11e944f 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -43,6 +43,7 @@ jobs: semantic_version: ${{ inputs.semantic_version }} extra_plugins: | @semantic-release/exec@6.0.3 + @semantic-release/github@10.0.2 - name: output id: output diff --git a/.releaserc.js b/.releaserc.js index 6716a53f7..b5347a750 100644 --- a/.releaserc.js +++ b/.releaserc.js @@ -9,6 +9,7 @@ module.exports = { [ "@semantic-release/github", { + draftRelease: true, assets: [ { path: ".artifacts/zitadel-linux-amd64/zitadel-linux-amd64.tar.gz",