Publish Package to npmjs #101
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 Package to npmjs | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| options: | |
| description: 'Publish options' | |
| required: true | |
| default: '--dry-run' | |
| type: choice | |
| options: | |
| - '--dry-run' | |
| - '--provenance --access public' | |
| - '--provenance --access public --tag preview' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm install -g npm | |
| - run: npm ci | |
| - run: npm publish ${OPTIONS} | |
| env: | |
| OPTIONS: ${{ inputs.options }} | |
| NODE_AUTH_TOKEN: ${{ secrets.VTBOT_NPM_TOKEN }} |