Skip to content

📦 Chore: update actions #18

📦 Chore: update actions

📦 Chore: update actions #18

Workflow file for this run

name: release
permissions:
contents: read
id-token: write
on:
push:
branches:
- master
- alpha
workflow_dispatch:
inputs:
publish_tag:
description: 'npm tag to publish with (default: latest)'
required: false
default: 'latest'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
registry-url: https://registry.npmjs.org
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Publish (master)
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: pnpm publish --access public --provenance
- name: Publish (alpha)
if: github.event_name == 'push' && github.ref == 'refs/heads/alpha'
run: pnpm publish --tag alpha --access public --publish-branch "${{ github.ref_name }}" --provenance
- name: Publish (manual)
if: github.event_name == 'workflow_dispatch'
run: pnpm publish --tag "${{ inputs.publish_tag || 'latest' }}" --access public --publish-branch "${{ github.ref_name }}" --provenance