gaia-project/.github/workflows/old-ui-publish.yml

46 lines
1.7 KiB
YAML

name: Old UI - Version and Release
on:
workflow_dispatch:
inputs:
newversion:
description: "Semantic Version Bump Type (major minor patch)"
default: patch
env:
node_version: 24
defaults:
run:
working-directory: old-ui
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 "🔖 (old-ui) v%s"
- run: yarn version --${{ github.event.inputs.newversion }}
# pnpm 10.16+ supports OIDC trusted publishing and rewrites the workspace:../engine
# dependency to a real version range; publish it via npx so we don't have to bump the
# repo-wide pnpm (which would force a lockfile rewrite). No NODE_AUTH_TOKEN is set, so
# publishing authenticates with the OIDC token instead of the (now-rejected) npm token.
# NODE_OPTIONS=--openssl-legacy-provider works around webpack 4's reliance on MD4,
# which OpenSSL 3 (bundled with Node >= 17) no longer supports out of the box.
- run: npx -y pnpm@latest publish . --access public --no-git-checks
env:
NODE_OPTIONS: --openssl-legacy-provider
- run: git push --follow-tags