Skip to content

Publish

Publish #1

Workflow file for this run

name: Publish
on:
# Release
release:
types: [released]
# Next
workflow_dispatch:
run-name: >-
${{
github.event_name == 'release' && 'Publish'
|| github.event_name == 'workflow_dispatch' && 'Next'
|| 'Publish' }}
jobs:
build:
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v5
- name: Prepare
uses: ./.github/actions/prepare
- run: npm run build
- run: npm publish --provenance --access public
build-next:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Prepare
uses: ./.github/actions/prepare
- name: Build next version
run: ./scripts/build-next
- run: npm publish --provenance --access public --tag next