Skip to content

AutoFlow Publish Existing #70

AutoFlow Publish Existing

AutoFlow Publish Existing #70

name: AutoFlow Publish Existing
on:
workflow_dispatch:
inputs:
version:
description: 'Target version (e.g., 0.41.0-alpha.1)'
required: true
dry_run:
description: 'Validate the release plan without publishing, pushing, tagging, or writing evidence'
required: false
default: false
type: boolean
concurrency:
group: openelement-release
cancel-in-progress: false
jobs:
release:
name: Execute release
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
contents: write
id-token: write
steps:
# v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/setup-deno-workspace
# v6.4.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Install Playwright browsers
run: ./node_modules/.bin/playwright install --with-deps chromium
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Configure npm auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > "$HOME/.npmrc"
echo "registry=https://registry.npmjs.org/" >> "$HOME/.npmrc"
- name: Publish version already merged to main
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_DRY_RUN: ${{ inputs.dry_run && '--dry-run' || '' }}
run: |
deno task autoflow:publish-existing --to ${{ inputs.version }} $RELEASE_DRY_RUN