Skip to content

Commit

Permalink
Merge pull request #95 from web3ui/feat/dynamic__publish
Browse files Browse the repository at this point in the history
Feat/dynamic  publish
  • Loading branch information
Y0moo authored Jan 25, 2022
2 parents 9cc0f57 + ede6e68 commit 60dec92
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 60dec92

Please sign in to comment.