0.1.3 #9
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 npm | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| dist-tag: | |
| required: false | |
| type: string | |
| jobs: | |
| publish: | |
| if: ${{ !github.event.release.prerelease }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Setup up Node.js environment | |
| uses: SBence/setup-node-workflow@master | |
| with: | |
| node-version: "*" | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Run code quality checks | |
| uses: ./.github/actions/check-code-quality | |
| - name: Create tarball | |
| run: yarn pack --filename package.tgz | |
| - name: Publish package | |
| run: | | |
| TAG_OPTION="" | |
| if [ -n "${{ github.event.inputs.dist-tag }}" ]; then | |
| TAG_OPTION="--tag ${{ github.event.inputs.dist-tag }}" | |
| fi | |
| npm publish package.tgz --provenance --access public $TAG_OPTION | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |