Skip to content

13.0.0

13.0.0 #30

name: Publish packages
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
steps:
- name: Checkout 🏷️
uses: actions/checkout@v4
- name: Match tag to package version 🧐
id: packageVersion
uses: geritol/match-tag-to-package-version@0.2.0
with:
TAG_PREFIX: v
- name: Set up Node 🕹️
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
registry-url: 'https://registry.npmjs.org'
- name: Install pnpm ⚙️
uses: pnpm/action-setup@v3
with:
version: 9.x
- name: Restore cache 📌
uses: actions/cache@v4
with:
path: |
~/setup-pnpm/node_modules/.bin/store
~/.cache/Cypress
key: cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Install dependencies ⚙️
run: pnpm install
- name: Build packages 📦
run: pnpm packages
- name: Publish packages 🥳
run: pnpm -r publish --access public --provenance --no-git-checks --tag $NPM_TAG
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TAG: "${{ contains(steps.packageVersion.outputs.PACKAGE_VERSION, 'beta') && 'next' || 'latest' }}"