Skip to content

docs: refresh og-image stats (227 endpoints, 2,498 tests) #480

docs: refresh og-image stats (227 endpoints, 2,498 tests)

docs: refresh og-image stats (227 endpoints, 2,498 tests) #480

Workflow file for this run

name: Release
on:
push:
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 22
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
- name: Ensure npm >= 11.15 (staged publishing)
run: |
NPM_VER=$(npm --version)
echo "Current npm: $NPM_VER"
if [ "$(printf '%s\n' "11.15.0" "$NPM_VER" | sort -V | head -1)" != "11.15.0" ]; then
echo "Upgrading npm to latest for staged publishing support..."
npm install -g npm@11.15.0
echo "Upgraded to: $(npm --version)"
fi
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm build
- name: Dry-run publish
run: |
for pkg in packages/auth packages/config packages/plugin-sdk packages/api packages/core packages/cli plugins/plugin-ci; do
PKG_NAME=$(node -p "require('./$pkg/package.json').name")
PKG_VER=$(node -p "require('./$pkg/package.json').version")
REGISTRY_VER=$(npm view "$PKG_NAME" version 2>/dev/null || echo "")
if [ "$PKG_VER" = "$REGISTRY_VER" ]; then
echo "--- skip: $pkg ($PKG_NAME@$PKG_VER already published) ---"
continue
fi
echo "--- dry-run: $pkg ($PKG_NAME@$PKG_VER) ---"
(cd "$pkg" && npm publish --dry-run 2>&1) || exit 1
done
- name: Create Release PR or Stage Packages
id: changesets
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1
with:
publish: pnpm release-staged
createGithubReleases: false
title: "chore: version packages"
commit: "chore: version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate SBOM
if: steps.changesets.outputs.published == 'true'
run: |
npx @cyclonedx/cdxgen@12.3.1 -o sbom.json -t javascript
echo "SBOM generated: $(jq '.components | length' sbom.json) components"
- name: Upload SBOM artifact
if: steps.changesets.outputs.published == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sbom
path: sbom.json
retention-days: 90
- name: List staged packages
if: steps.changesets.outputs.published == 'true'
run: |
echo "Packages staged for review. Approve with: npm stage approve <stage-id>"
echo "Or review at: https://www.npmjs.com/settings/gpc-cli/staged-packages"
npm stage list 2>&1 || echo "Run 'npm stage list' locally to see staged packages."