Skip to content

Commit 54c13c0

Browse files
authored
Merge pull request #22 from github/fix-browser-tests
Fix npm OIDC publishing and CI status on changeset PRs
2 parents 71e3c22 + 2a88103 commit 54c13c0

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
push:
5-
branches: [main, changeset-release/main]
5+
branches: [main]
66
pull_request:
77
branches: [main]
88
merge_group:

.github/workflows/publish.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ permissions:
88
contents: write
99
pull-requests: write
1010
id-token: write
11+
statuses: write
1112

1213
jobs:
1314
release:
@@ -21,9 +22,11 @@ jobs:
2122
node-version: 22
2223
cache: npm
2324
registry-url: https://registry.npmjs.org
25+
scope: '@github-ui'
2426
- run: npm ci
2527
- run: npm run build
2628
- name: Create release PR or publish
29+
id: changesets
2730
uses: changesets/action@v1
2831
with:
2932
version: npm run version-packages
@@ -32,3 +35,13 @@ jobs:
3235
commit: "chore: version packages"
3336
env:
3437
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
- name: Report CI status on changeset PR
39+
if: steps.changesets.outputs.pullRequestNumber
40+
env:
41+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
run: |
43+
sha=$(gh pr view ${{ steps.changesets.outputs.pullRequestNumber }} --json headRefOid -q .headRefOid)
44+
gh api repos/${{ github.repository }}/statuses/$sha \
45+
-f state=success \
46+
-f context=CI \
47+
-f description="Skipped for version-only PR (code validated on main)"

0 commit comments

Comments
 (0)