Skip to content

Publish

Publish #22

Workflow file for this run

name: Publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
name: Publish to npm
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: 'https://registry.npmjs.org/'
# Setup .npmrc file to publish to GitHub Packages
- name: Set NPM Variables
run: echo "$PACKAGES_NPMRC" > .npmrc
env:
PACKAGES_NPMRC: ${{ secrets.PACKAGES_NPMRC }}
- name: Install
run: yarn
- name: Build
run: yarn build
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: 'https://npm.pkg.github.com'
scope: '@platformbuilders'
# Publish to GitHub Packages
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}