relase v1.0.8 #10
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: Publish to NPM + Create GitHub Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
NODE_VER: '23.7.0' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VER }} | |
- run: npm install | |
- run: npm run build | |
# - run: npm test | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: npm-package | |
path: | | |
dist/** | |
README.md | |
package.json | |
NOTICE | |
LICENSE | |
publish-npm: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VER }} | |
registry-url: https://registry.npmjs.org/ | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: npm-package | |
path: . | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} | |
publish-release: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: npm-package | |
path: . | |
- name: Tar Gz artifact for release | |
run: tar -czvf release.tar.gz dist/** README.md package.json NOTICE LICENSE | |
- name: Create GitHub Release | |
uses: softprops/[email protected] | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
body_path: CHANGELOG.md | |
files: release.tar.gz |