update github workflows #1
Workflow file for this run
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: Publish | ||
| on: | ||
| release: | ||
| types: [ published ] | ||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '24' | ||
| - name: npm install & set Version | ||
| run: | | ||
| npm ci | ||
| npm config set git-tag-version false | ||
| npm version ${{ github.event.release.tag_name }} | ||
| ß | ||
| - name: build & pack | ||
| run: | | ||
| npm run build --if-present | ||
| npm pack | ||
| - uses: JS-DevTools/npm-publish@v3 | ||
| if: "!github.event.release.prerelease" | ||
| with: | ||
| token: ${{ secrets.NPM_TOKEN }} | ||
| - name: Upload Release Asset | ||
| uses: actions/upload-release-asset@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| upload_url: '${{ github.event.release.upload_url }}' | ||
| asset_path: ./${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tgz | ||
| asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tgz | ||
| asset_content_type: application/zip | ||