Skip to content

Release

Release #10

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
increment:
description: "Version bump (patch, minor, major)"
required: true
default: "patch"
type: choice
options:
- patch
- minor
- major
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 24
check-latest: true
cache: npm
- run: git config user.name "github-actions[bot]"
- run: git config user.email "github-actions[bot]@users.noreply.github.com"
- run: npm ci
- run: npm run lint
- run: npm run typecheck
# Fetch latest version from npm, bump it, write to package.json.
# Nothing is committed — the bumped version lives only in the CI
# runner's working directory. release-it tags + publishes from it.
- name: Bump version from npm registry
run: |
LATEST=$(npm view acpx version 2>/dev/null || echo "0.0.0")
echo "Latest on npm: $LATEST"
npm version --no-git-tag-version "$LATEST" --allow-same-version
npm version --no-git-tag-version ${{ inputs.increment }}
VERSION=$(node -p 'require("./package.json").version')
echo "Releasing: $VERSION"
- name: Release
run: |
VERSION=$(node -p 'require("./package.json").version')
npm run release:ci -- --increment "$VERSION"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: "true"