Skip to content

Commit

Permalink
fix(ci): set prerelease and latest flag properly.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jvanz committed Mar 13, 2024
1 parent cdc533e commit 1c69339
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,16 @@ 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,
release_id: `${RELEASE_ID}`,
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
Expand Down

0 comments on commit 1c69339

Please sign in to comment.