v1.6.1 #12
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: | |
- uses: actions/checkout@v2 | |
with: | |
ref: main | |
# Installs Node and sets up up the .npmrc file to publish to npm | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
# Run the tests up to 5 times if it fails (to avoid the error "Network error when sending | |
# the announce packet: Bad file descriptor" that occurs sometimes on startup) | |
# TODO: investigate and fix the actual issue. | |
- shell: bash | |
run: ./tests/run-with-retries.sh | |
- run: node .github/auto-publish-action.js | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |