Npm Publish #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Npm Publish | |
env: | |
NODE_VERSION: "20" | |
NPM_USERNAME: "mucpsing" | |
NPM_EMAIL: "[email protected]" | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
registry-url: 'https://registry.npmjs.org' | |
- name: npm install | |
run: npm install | |
- name: build | |
run: tsc | |
- name: check_env | |
run: echo "${{env.NPM_USERNAME}}@${{env.NPM_EMAIL}}" | |
- name: check_NPM | |
run: npm who am i | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_2024 }} | |
- name: Publish | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_2024 }} | |
# uses: JS-DevTools/npm-publish@v1 | |
# with: | |
# token: ${{secrets.NPM_TOKEN}} | |
# access: "public" | |
# - name: Release This Version | |
# uses: softprops/action-gh-release@v1 | |
# with: | |
# token: ${{ secrets.GTH_TOKEN }} |