46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Engine - Version and Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
newversion:
|
|
description: "Semantic Version Bump Type"
|
|
type: choice
|
|
options:
|
|
- patch
|
|
- minor
|
|
- major
|
|
default: patch
|
|
|
|
env:
|
|
node_version: 24
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: engine
|
|
|
|
jobs:
|
|
version_and_release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # git push --follow-tags
|
|
id-token: write # OIDC trusted publishing
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js ${{ env.node_version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.node_version }}
|
|
# registry-url is required so npm publish targets the public npm registry
|
|
registry-url: "https://registry.npmjs.org"
|
|
- run: corepack enable
|
|
- run: pnpm install
|
|
- run: git config --global user.name github-actions
|
|
- run: git config --global user.email bot@github.com
|
|
- run: yarn config set version-git-message "🔖 (engine) v%s"
|
|
- run: yarn version --${{ github.event.inputs.newversion }}
|
|
# pnpm 10.16+ supports OIDC trusted publishing; publish via npx so we don't have to bump
|
|
# the repo-wide pnpm. No NODE_AUTH_TOKEN is set, so publishing authenticates with the
|
|
# OIDC token instead of the (now-rejected) npm token.
|
|
- run: npx -y pnpm@latest publish . --access public --no-git-checks
|
|
- run: git push --follow-tags
|