Skip to content

Add pnum (#1935)

Add pnum (#1935) #605

name: Packages Release
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
jobs:
turbo-compile:
name: Compile
uses: ./.github/workflows/compile-wasm.yml
publish:
name: Packages Release
runs-on: buildjet-16vcpu-ubuntu-2204
needs: turbo-compile
steps:
- uses: actions/checkout@v4
- id: built
uses: buildjet/cache@v4
with:
path: .turbo
key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-built
restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled
- uses: pnpm/action-setup@v4
- uses: buildjet/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm turbo telemetry disable
- run: pnpm turbo lint:strict --cache-dir=.turbo
- run: pnpm turbo build --cache-dir=.turbo
# If there are changesets, this action will create a PR on the repo to version packages
# If there are none, it will publish newer-versioned public packages to npm
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}