Try publishing to github package manager #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: Build and Publish to NPM | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
registry-url: 'https://npm.pkg.github.com' | |
- run: yarn build | |
- run: yarn pack -f package.tgz | |
- run: npm publish package.tgz # --provenance --access public | |
env: | |
# Publish with github until I gain access to my npm account | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |