Publish to npm #68
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
package: | |
description: 'Which package to publish?' | |
required: true | |
type: choice | |
default: itwinui-css | |
options: | |
- itwinui-css | |
- itwinui-variables | |
- itwinui-react | |
tag: | |
description: 'Which npm tag to publish to?' | |
required: true | |
type: choice | |
default: latest | |
options: | |
- latest | |
- dev | |
workflow_call: | |
inputs: | |
package: | |
required: true | |
type: string | |
default: itwinui-css | |
tag: | |
required: true | |
type: string | |
default: latest | |
secrets: | |
NPMJS_PUBLISH_ITWIN: | |
required: true | |
jobs: | |
publish: | |
name: Build and publish output to npm | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node 18.X | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org/ | |
- run: yarn install | |
- run: yarn build --filter={./packages/*}... | |
- run: npm publish --access public --tag ${{ inputs.tag }} | |
working-directory: './packages/${{ inputs.package }}/' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_ITWIN }} |