Skip to content

Commit

Permalink
The draft nightly untagged release is incorrectly created by 'Release…
Browse files Browse the repository at this point in the history
… nightly' GH action

closes keycloak#558

Signed-off-by: mposolda <[email protected]>
  • Loading branch information
mposolda committed Jan 23, 2025
1 parent 7536d2c commit dcfed62
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/x-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,14 @@ jobs:
- name: Push changes
run: git push --force origin refs/tags/${{ inputs.tag }}

- name: Check if release exists
id: release-exists
run: >
echo "release-exists=$(
if ( gh release view ${{ inputs.tag }} --repo ${{ inputs.gh-org }}/keycloak-nodejs-connect &> /dev/null ); then
echo 'true'
else
echo 'false'
fi
)" >> "$GITHUB_OUTPUT"
- name: Create a github release
if: steps.release-exists.outputs.release-exists == 'false'
run: gh release create ${{ inputs.tag }} --repo ${{ inputs.gh-org }}/keycloak-nodejs-connect --title ${{ inputs.tag }} --draft ${{ inputs.nightly && '--prerelease' || '' }}
- name: Create a github release if does not exists
id: create-release-if-not-exists
run: |
if ( gh release view ${{ inputs.tag }} --repo ${{ inputs.gh-org }}/keycloak-nodejs-connect &> /dev/null ); then
echo "Release ${{ inputs.tag }} already exists"
else
gh release create ${{ inputs.tag }} --repo ${{ inputs.gh-org }}/keycloak-nodejs-connect --title ${{ inputs.tag }} --draft ${{ inputs.nightly && '--prerelease' || '' }}
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit dcfed62

Please sign in to comment.