Skip to content

Commit

Permalink
ci(release): use tags
Browse files Browse the repository at this point in the history
  • Loading branch information
nckhell committed Jan 10, 2025
1 parent 2b605a1 commit fb21ba7
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Compile and publish package

on:
push:
branches: ['main', 'release/*']
release:
types: [published]

jobs:
deploy:
Expand Down Expand Up @@ -39,13 +39,6 @@ jobs:

- name: Publish to NPM Registry
run: |
pkg_version=$(cat package.json | jq -r '.version')
branch=${GITHUB_REF##*/}
if [[ $branch != "main" ]]; then
yarn version "$pkg_version-beta$GITHUB_RUN_NUMBER"
yarn npm publish --tag beta --access public
else
yarn version "$pkg_version"
yarn npm publish --access public
fi
release_version=${GITHUB_REF##*/}
yarn version "$release_version"
yarn npm publish --access public

0 comments on commit fb21ba7

Please sign in to comment.