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 000e8ca commit fde64b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,16 @@ jobs:
script: |
const {RELEASE_ID} = process.env
const {TAG_NAME} = process.env
let IS_PRERELEASE = `${{ 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') }}`
prerelease: `${IS_PRERELEASE}`,
make_latest: !`${IS_PRERELEASE}`
});
- name: Trigger chart update
Expand Down

0 comments on commit fde64b9

Please sign in to comment.