From 1c693398086868cda77cebc5e8706d59d23dd243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= Date: Wed, 13 Mar 2024 15:53:35 -0300 Subject: [PATCH] fix(ci): set prerelease and latest flag properly. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release.yml is not properly setting the release as prerelease or latest release because the field used to check if the tag is a prerelease was not populated. This commit fixes that using another field. Signed-off-by: José Guilherme Vanz --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f160963..68ecf0a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,6 +147,7 @@ jobs: script: | const {RELEASE_ID} = process.env const {TAG_NAME} = process.env + isPreRelease = ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }} github.rest.repos.updateRelease({ owner: context.repo.owner, repo: context.repo.repo, @@ -154,8 +155,8 @@ jobs: draft: false, tag_name: `${TAG_NAME}`, name: `${TAG_NAME}`, - prerelease: `${{ contains(github.event.workflow_run.head_branch, '-alpha') || contains(github.event.workflow_run.head_branch, '-beta') || contains(github.event.workflow_run.head_branch, '-rc') }}`, - make_latest: `${{ !(contains(github.event.workflow_run.head_branch, '-alpha') || contains(github.event.workflow_run.head_branch, '-beta') || contains(github.event.workflow_run.head_branch, '-rc')) }}` + prerelease: isPreRelease, + make_latest: !isPreRelease }); - name: Trigger chart update