upload to npm registry is done from jason2866 repo #4
This file contains hidden or 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: Build and upload to NPM | |
on: | |
push: | |
workflow_dispatch: | |
# Allow one concurrent deployment | |
concurrency: | |
group: environment-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Remove old files and folders | |
run: | | |
rm -rf package-lock.json | |
rm -rf dist | |
- name: install node v20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install NPM | |
run: npm install | |
- name: Compile TypeScript | |
run: | | |
npm run build | |
- name: Commit Distribution Files | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "Github Action: Updated dist files" | |
# - name: Publish to NPM registry | |
# uses: JS-DevTools/npm-publish@v3 | |
# with: | |
# registry: https://registry.npmjs.org/ | |
# token: ${{ secrets.NPM_TOKEN }} | |
# strategy: all |