Skip to content

Commit 6bc9844

Browse files
docs: document trusted publishing flow
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 8021099 commit 6bc9844

6 files changed

Lines changed: 21 additions & 9 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ npm run ci:check
130130

131131
- GitHub release automation is active on `main`.
132132
- `release-please` opens or refreshes a release PR from conventional commits, then creates the GitHub release when that PR is merged.
133-
- npm publish runs from the `Release` workflow only after a release is created and a valid `NPM_TOKEN` is configured.
133+
- The package already exists on npm; future publishes target npm trusted publishing with GitHub OIDC instead of a long-lived `NPM_TOKEN`.
134+
- `.github/workflows/publish.yml` verifies the package with `npm run ci:check` and `npm run pack:dry-run` before any publish step.
135+
- Real npm publish runs from the `published` release event and checks that the GitHub tag matches `package.json`.
134136
- If you want CI to run automatically on release PRs, add an optional `RELEASE_PLEASE_TOKEN` secret backed by a GitHub PAT.
135137

136138
## Repository Layout

README.tr.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ npm run ci:check
130130

131131
- GitHub release otomasyonu `main` uzerinde aktif.
132132
- `release-please`, conventional commit gecmisine gore release PR acip gunceller; bu PR merge edilince GitHub release olusturulur.
133-
- npm publish adimi, yalnizca release olustuktan sonra ve gecerli bir `NPM_TOKEN` tanimliysa `Release` workflow'u icinde calisir.
133+
- Paket npm'de zaten mevcut; sonraki yayinlar uzun omurlu `NPM_TOKEN` yerine GitHub OIDC tabanli npm trusted publishing hedefiyle calisir.
134+
- `.github/workflows/publish.yml`, publish oncesi `npm run ci:check` ve `npm run pack:dry-run` ile paketi dogrular.
135+
- Gercek npm publish adimi `published` release eventiyle calisir ve GitHub tag'inin `package.json` surumuyle eslestigini kontrol eder.
134136
- Release PR'larda CI'nin otomatik calismasi isteniyorsa GitHub PAT tabanli opsiyonel bir `RELEASE_PLEASE_TOKEN` secret'i eklenmelidir.
135137

136138
## Repo Yapisi

RELEASE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
- Conventional commits determine the next version.
1010
- Release PRs keep `CHANGELOG.md` and `package.json` in sync before a release is cut.
1111
- GitHub releases are generated when the release PR is merged.
12-
- npm publishing runs after the GitHub release is created and release credentials are available.
12+
- The first npm publish is already complete; later publishes should use npm trusted publishing with GitHub OIDC.
13+
- `.github/workflows/publish.yml` verifies package quality before publish and rejects tag/version mismatches.
1314

1415
## Maintainer checklist
1516

1617
1. Merge verified changes into `main`.
1718
2. Confirm `npm run ci:check` is green locally or in CI.
1819
3. Review and merge the release PR generated by the `Release` workflow.
19-
4. Verify the generated release notes and package publication result.
20-
5. Confirm `CHANGELOG.md`, `package.json`, and the GitHub release match the shipped change.
20+
4. Ensure npm trusted publisher mapping points to `publish.yml`.
21+
5. Verify the generated release notes and package publication result.
22+
6. Confirm `CHANGELOG.md`, `package.json`, and the GitHub release match the shipped change.
2123

2224
## Conventional commit guide
2325

@@ -33,3 +35,4 @@
3335
- `release-please-config.json`
3436
- `.release-please-manifest.json`
3537
- `.github/workflows/release.yml`
38+
- `.github/workflows/publish.yml`

RELEASE.tr.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
- Conventional commit mesajlari yeni versiyonu belirler.
1010
- Release PR, `CHANGELOG.md` ve `package.json` dosyalarini surum oncesi senkron tutar.
1111
- Release PR merge edilince GitHub release olusturulur.
12-
- `NPM_TOKEN` varsa npm yayini release olustuktan sonra yapilir.
12+
- Ilk npm yayini zaten tamamlandi; sonraki yayinlar GitHub OIDC tabanli npm trusted publishing ile yapilmalidir.
13+
- `.github/workflows/publish.yml`, publish oncesi kaliteyi dogrular ve tag/surum uyusmazligini reddeder.
1314

1415
## Bakimci kontrol listesi
1516

1617
1. Dogrulanmis degisiklikleri `main` icine alin.
1718
2. `npm run ci:check` sonucunu dogrulayin.
1819
3. `Release` workflow'unun actigi release PR'i gozden gecirip merge edin.
19-
4. GitHub release notlarini, `CHANGELOG.md` guncellemesini ve npm yayin sonucunu kontrol edin.
20+
4. npm trusted publisher kaydinin `publish.yml` dosyasina bagli oldugunu dogrulayin.
21+
5. GitHub release notlarini, `CHANGELOG.md` guncellemesini ve npm yayin sonucunu kontrol edin.

docs/en/developer-guide/release-process.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ Conventional commits define semantic version changes.
1616
2. GitHub Actions runs `npm run ci:check`.
1717
3. The `Release` workflow opens or updates a release PR.
1818
4. Merging that release PR creates the GitHub release and updates `CHANGELOG.md` and `package.json`.
19-
5. npm publish runs when `NPM_TOKEN` is configured.
19+
5. The `Publish Package` workflow verifies the package and publishes through npm trusted publishing.
20+
6. The publish job fails if the GitHub release tag does not match `package.json`.
2021

2122
## Important files
2223

2324
- `release-please-config.json`
2425
- `.release-please-manifest.json`
2526
- `.github/workflows/release.yml`
27+
- `.github/workflows/publish.yml`
2628
- `package.json`

docs/tr/developer-guide/release-process.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ Conventional commit mesajlari semantic version artisini belirler.
1515
1. Dogrulanmis degisikligi `main` icine al.
1616
2. `npm run ci:check` sonucunu dogrula.
1717
3. `Release` workflow'unun olusturdugu release PR'i gozden gecir.
18-
4. Release PR merge edildikten sonra GitHub release, `CHANGELOG.md` ve npm yayin sonucunu kontrol et.
18+
4. Release PR merge edildikten sonra `Publish Package` workflow'unun paketi dogruladigini ve trusted publishing ile yayimladigini kontrol et.
19+
5. GitHub release, `CHANGELOG.md` ve npm yayin sonucunu kontrol et.

0 commit comments

Comments
 (0)