Skip to content

🔖 Bumped patch version to 1.4.2 #14

🔖 Bumped patch version to 1.4.2

🔖 Bumped patch version to 1.4.2 #14

Workflow file for this run

name: publish
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🌀 clone the repository
uses: actions/checkout@v3
- name: 🔧 setup node.js
uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 18.x
- name: 🔧 get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: 🔧 setup cache
uses: actions/cache@v3
id: yarn-cache
with:
path: |
**/node_modules
**/.eslintcache
**/dist
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ github.run_id }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ github.run_id }}-
- name: 📦 install dependencies
run: yarn
- name: 🛠️ build
run: yarn build
publish:
needs: build
strategy:
matrix:
registry: ['registry.npmjs.org', 'npm.pkg.github.com']
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: 🌀 clone the repository
uses: actions/checkout@v3
- name: 🔧 setup node.js
uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 18.x
registry-url: 'https://${{ matrix.registry }}'
- name: 🔧 get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: 🔧 setup cache
uses: actions/cache@v3
id: yarn-cache
with:
path: |
**/node_modules
**/.eslintcache
**/dist
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ github.run_id }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ github.run_id }}-
- name: 🚀 publish to GitHub
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
if: matrix.registry == 'npm.pkg.github.com'
- name: 🚀 publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: matrix.registry == 'registry.npmjs.org'