Skip to content

Commit 5e22287

Browse files
authored
Merge pull request #258 from bbopen/chore/remove-release-please-job
ci: remove vestigial release-please job from release workflow
2 parents 493b082 + 3f53189 commit 5e22287

2 files changed

Lines changed: 27 additions & 44 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Please
1+
name: Release
22

33
on:
44
push:
@@ -12,7 +12,6 @@ on:
1212

1313
permissions:
1414
contents: write
15-
pull-requests: write
1615

1716
jobs:
1817
detect_release_state:
@@ -73,20 +72,6 @@ jobs:
7372
echo "publish_from_main=${PUBLISH_FROM_MAIN}" >> "$GITHUB_OUTPUT"
7473
echo "publish_existing_tag=${PUBLISH_EXISTING_TAG}" >> "$GITHUB_OUTPUT"
7574
76-
release_please:
77-
needs: detect_release_state
78-
if: ${{ needs.detect_release_state.outputs.publish_from_main != 'true' && needs.detect_release_state.outputs.publish_existing_tag != 'true' }}
79-
runs-on: ubuntu-latest
80-
outputs:
81-
release_created: ${{ steps.release.outputs.release_created || 'false' }}
82-
tag_name: ${{ steps.release.outputs.tag_name }}
83-
steps:
84-
- uses: googleapis/release-please-action@v5
85-
id: release
86-
with:
87-
release-type: node
88-
token: ${{ secrets.GITHUB_TOKEN }}
89-
9075
publish_existing_main_release:
9176
needs: detect_release_state
9277
if: ${{ needs.detect_release_state.outputs.publish_from_main == 'true' }}
@@ -143,12 +128,11 @@ jobs:
143128
echo "tag_name=${TAG_NAME}" >> "$GITHUB_OUTPUT"
144129
145130
publish_npm:
146-
needs: [detect_release_state, release_please, publish_existing_main_release]
131+
needs: [detect_release_state, publish_existing_main_release]
147132
if: >-
148133
${{
149134
always() &&
150135
(
151-
needs.release_please.outputs.release_created == 'true' ||
152136
needs.publish_existing_main_release.outputs.release_ready == 'true' ||
153137
needs.detect_release_state.outputs.publish_existing_tag == 'true'
154138
)
@@ -163,8 +147,6 @@ jobs:
163147
with:
164148
ref: >-
165149
${{
166-
needs.release_please.outputs.release_created == 'true' &&
167-
needs.release_please.outputs.tag_name ||
168150
needs.publish_existing_main_release.outputs.release_ready == 'true' &&
169151
needs.publish_existing_main_release.outputs.tag_name ||
170152
needs.detect_release_state.outputs.tag_name

docs/release.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,38 @@
22

33
## tywrap (npm)
44

5-
1. Ensure the working tree is clean and `main` is up to date.
6-
7-
2. Check the release-please branch or PR for the next npm release. Verify:
8-
- `package.json`
9-
- `package-lock.json`
10-
- `src/index.ts`
11-
- `CHANGELOG.md`
12-
13-
3. Run the release gate in CI-style mode:
5+
Releases publish from `main` via the [`release.yml`](../.github/workflows/release.yml)
6+
workflow. There is one path: bump the version on a branch, merge to `main`, and the
7+
workflow tags, releases, and publishes.
8+
9+
1. On a release branch, bump the version and update the changelog:
10+
- `package.json` — the new `version`
11+
- `CHANGELOG.md` — add a `## [X.Y.Z](…compare/vPREV...vX.Y.Z) (DATE)` section
12+
(the workflow extracts the GitHub release notes from this exact header)
13+
- `src/version.ts` — regenerate with `npm run build:version` (single-sourced
14+
from `package.json`)
15+
- `package-lock.json` — refresh if dependencies changed
16+
17+
2. Run the release gate:
1418
```sh
1519
CI=1 npm run check:all
1620
```
1721

18-
4. Merge the reviewed release branch or PR to `main`. The [`release.yml`](../.github/workflows/release.yml)
19-
workflow has two paths:
20-
- normal path: `release-please` opens or updates the release PR, then creates the npm tag and release after that PR is merged
21-
- fallback path: if `main` already contains an unreleased `package.json` version with a matching `CHANGELOG.md` section, the workflow tags and publishes that version directly from `main`
22-
23-
5. npm publishing uses npm trusted publishing from GitHub Actions. Keep the npm
24-
package connected to this repository as a trusted publisher, and do not add a
25-
publish token to the workflow for the normal release path. The release job
26-
validates the tagged package on Node 22, then switches to Node 24 for the
27-
final `npm publish --provenance` step so npm uses an OIDC-capable CLI.
22+
3. Open a PR, get CI green, and merge to `main`. On that push `release.yml`
23+
detects that `main` carries an unreleased `package.json` version with a
24+
matching `CHANGELOG.md` section and no existing tag, then tags `vX.Y.Z`,
25+
creates the GitHub release from that changelog section, and publishes to npm.
2826

29-
6. For the normal `release-please` path, keep the repository Actions setting
30-
`Allow GitHub Actions to create and approve pull requests` enabled.
27+
4. npm publishing uses npm trusted publishing (OIDC) from GitHub Actions — keep
28+
the package connected to this repository as a trusted publisher, and do not
29+
add a publish token to the workflow. The publish job validates on Node 22,
30+
then switches to Node 24 for the final `npm publish --provenance` step so npm
31+
uses an OIDC-capable CLI.
3132

32-
7. To publish an existing release tag without opening a new release PR, run the
33-
`Release Please` workflow manually with `publish_tag=vX.Y.Z`.
33+
5. To (re)publish an already-tagged version without changing `main`, run the
34+
`Release` workflow manually with `publish_tag=vX.Y.Z`.
3435

35-
8. If GitHub Actions release automation is unavailable, use the manual fallback:
36+
6. If GitHub Actions release automation is unavailable, use the manual fallback:
3637
```sh
3738
node scripts/release.mjs <version> --commit --tag
3839
git push && git push --tags

0 commit comments

Comments
 (0)