Sistent v0.15.16 #278
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 NPM Package | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| release_version: | |
| description: "Release Version" | |
| required: true | |
| default: "v1.0.0" | |
| type: string | |
| env: | |
| HUSKY: 0 | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| id-token: write # Required for OIDC trusted publishing | |
| contents: write | |
| steps: | |
| - name: "Set Package Version" | |
| uses: reedyuk/[email protected] | |
| with: | |
| version: ${{ github.event.release.tag_name }} | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| registry-url: "https://registry.npmjs.org" | |
| scope: "@sistent" | |
| - run: | | |
| npm install | |
| npm run build | |
| npm publish --provenance --access public --verbose | |
| env: | |
| NODE_AUTH_TOKEN: '' # Explicitly empty for install | |
| versions-check: | |
| needs: publish | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v7 | |
| id: versions | |
| with: | |
| result-encoding: strings | |
| script: | | |
| let str = `${{github.event.release.tag_name}}` | |
| return str.replace(/^v/, '') | |
| - name: Save Release number | |
| if: ${{ !cancelled() }} | |
| run: | | |
| mkdir -p ./version | |
| echo ${{ steps.versions.outputs.result }} > ./version/number | |
| - name: Upload Version Report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
| with: | |
| name: version-number | |
| path: | | |
| version/number | |
| retention-days: 14 |