Skip to content

v0.1.82 🌈

v0.1.82 🌈 #201

Workflow file for this run

name: '🧨 Publish Package to npmjs'
on:
release:
types: [released]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: '📦 Installing dependencies'
run: yarn --frozen-lockfile
- name: '🏗 Build package'
run: yarn build
- name: '📏 Run unit tests'
run: yarn test
- name: '🧳 Prepare .npmrc'
run: cp .npmrc.template .npmrc
- name: '🚀 Publish to npm'
if: startsWith(github.ref, 'refs/tags/v')
run: |
VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')
echo "Publishing version $VERSION to npm..."
yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}