Skip to content

fix: unify React selectors and ownership coverage (#101) #92

fix: unify React selectors and ownership coverage (#101)

fix: unify React selectors and ownership coverage (#101) #92

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: read
jobs:
quality:
name: Quality gate
uses: ./.github/workflows/ci.yml
release:
name: Version or Publish
needs: quality
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
with:
registry-url: "https://registry.npmjs.org"
# OIDC trusted publishing forces provenance, which require()s a bundled `sigstore` module npm 11.9+/12 dropped while still importing it. 11.5.1 is the last release that bundles it — pin until npm fixes the regression.
- name: Pin npm with working trusted-publishing provenance
run: npm install --global npm@11.5.1
# Opens/updates the Version Packages PR while changesets are pending; hasChangesets flips to false once that PR merges.
- name: Version
id: changesets
uses: changesets/action@v1
with:
version: pnpm version-packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Pack with pnpm so workspace ranges resolve, then publish the tarballs with npm because pnpm's OIDC path currently 404s (pnpm/pnpm#11513).
- name: Publish and release
if: steps.changesets.outputs.hasChangesets == 'false'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm build
release_dir="$RUNNER_TEMP/genie-release"
pnpm exec node scripts/prepare-release.mjs --output "$release_dir"
while IFS=$'\t' read -r name version dir tarball; do
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "$name@$version already published — skipping"
continue
fi
echo "Publishing $name@$version"
npm publish "$tarball" --access public
notes=$(awk -v hdr="## $version" '$0==hdr{s=1} /^## /&&$0!=hdr{if(s)exit} s' "$dir/CHANGELOG.md")
gh release create "$name@$version" --target "$GITHUB_SHA" --title "$name@$version" --notes "${notes:-$name@$version}"
done < "$release_dir/release-plan.tsv"