Skip to content

Commit

Permalink
block if release version exists
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnlindsay committed Oct 13, 2023
1 parent ea44390 commit e859cac
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,27 @@ jobs:
with:
cmd: 'jq .version package.json -r'

- uses: cardinalby/git-get-release-action@v1
- name: Check existing beta releases
uses: cardinalby/git-get-release-action@v1
id: released
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: "v${{ steps.version.outputs.value }}"
doNotFailIfNotFound: true

- name: Show me
run: "${{ steps.released.success }}"

- name: Block if found
run: |
if [[ ${{ steps.released.success }} ]];
then
echo "A release already exists from this version, you must bump the version to create a new beta"
exit 1
else
echo "No release for this version, generating beta package."
fi

0 comments on commit e859cac

Please sign in to comment.