v0.4.4 #10
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: | |
release: | |
types: [published] | |
jobs: | |
publish_to_npm: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
# Installs Node and sets up up the .npmrc file to publish to npm | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'yarn' | |
- name: Install node-gyp | |
run: npm install -g node-gyp@10.0.1 | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Run tests | |
run: yarn test | |
- name: Publish to npm | |
run: node .github/auto-publish-action.js | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |