Publish #1
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: Compile | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: | |
- Test and lint | |
types: | |
- completed | |
env: | |
NODE_ENV: production | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org | |
- name: Install dependencies | |
run: npm ci | |
- name: Build dist | |
run: npm run build | |
- name: Publish | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |