Skip to content

Commit

Permalink
block if release version exists, otherwise build
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnlindsay committed Oct 13, 2023
1 parent e859cac commit 3272ffd
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,24 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: "v${{ steps.version.outputs.value }}"
doNotFailIfNotFound: true

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

- name: Block if found
if: "${{ steps.released.outputs.id }}"
run: |
echo "This version has already been release, update project version in package.json to produce beta package."
exit 1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Build
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
npm install
npm run build

0 comments on commit 3272ffd

Please sign in to comment.