Skip to content

Commit

Permalink
feat: beta and alpha publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Y0moo committed Jan 25, 2022
1 parent 63505b2 commit ede6e68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ jobs:
# run tests just in case
- run: npm test
- run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
# publish to NPM
- run: npm publish --tag ${{ github.event.release.target_commitish }}

- name: publish to NPM alpha version
if: '!github.event.release.prerelease'
run: npm publish --tag latest
env:
# Use a token to publish to NPM. See below for how to set it up
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: publish to NPM beta version
if: 'github.event.release.prerelease'
run: npm publish --tag beta
env:
# Use a token to publish to NPM. See below for how to set it up
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# push the version changes to GitHub
- run: git push origin HEAD:master
env:
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
"pre-commit": "tsdx lint && npm prettier"
}
},
"publishConfig": {
"tag": "latest"
},
"prettier": {
"printWidth": 80,
"semi": true,
Expand Down

0 comments on commit ede6e68

Please sign in to comment.