Skip to content

Commit 4b23144

Browse files
committed
fix(ci): set prerelease and latest flag properly.
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 <jguilhermevanz@suse.com>
1 parent 000e8ca commit 4b23144

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,16 @@ jobs:
119119
script: |
120120
const {RELEASE_ID} = process.env
121121
const {TAG_NAME} = process.env
122+
isPreRelease = ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }}
122123
github.rest.repos.updateRelease({
123124
owner: context.repo.owner,
124125
repo: context.repo.repo,
125126
release_id: `${RELEASE_ID}`,
126127
draft: false,
127128
tag_name: `${TAG_NAME}`,
128129
name: `${TAG_NAME}`,
129-
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') }}`
130+
prerelease: isPreRelease,
131+
make_latest: !isPreRelease
130132
});
131133
132134
- name: Trigger chart update

0 commit comments

Comments
 (0)