Skip to content

Commit e2403d3

Browse files
fix: manually call post-release.yml on release (#421)
## PR Checklist - [x] Addresses an existing open issue: fixes #390 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Per #390 (comment), the workflow needs to be manually fired. Also removes an old unnecessary `hooks:bump` line from `.release-it.json` that I don't think ever did anything.
1 parent 18eb00a commit e2403d3

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ jobs:
3131
}
3232
}
3333
- env:
34-
GITHUB_TOKEN: ${{ github.token }}
35-
run: if pnpm run should-semantic-release ; then pnpm release-it --verbose ; fi
34+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
35+
run: |
36+
if pnpm run should-semantic-release ; then
37+
pnpm release-it --verbose
38+
gh workflow run post-release.yml
39+
fi
3640
- if: always()
3741
name: Recreate branch protection on main
3842
uses: actions/[email protected]

.release-it.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@
77
"autoGenerate": true,
88
"release": true,
99
"releaseName": "v${version}"
10-
},
11-
"hooks": {
12-
"before:bump": "if ! pnpm run should-semantic-release --verbose ; then exit 1 ; fi"
1310
}
1411
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To use this template:
5858
1. Click the [_Use this template_](https://github.com/JoshuaKGoldberg/template-typescript-node-package/generate) button to create a new repository with the same Git history
5959
2. Open that repository, such as by [cloning it locally](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) or [developing in a codespace](https://docs.github.com/en/codespaces/developing-in-codespaces/developing-in-a-codespace)
6060
3. Create two tokens in [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets):
61-
- `ACCESS_TOKEN`: A [GitHub PAT](https://github.com/settings/tokens/new) with _repo_ permissions
61+
- `ACCESS_TOKEN`: A [GitHub PAT](https://github.com/settings/tokens/new) with _repo_ and _workflow_ permissions
6262
- `NPM_TOKEN`: An [npm access token](https://docs.npmjs.com/creating-and-viewing-access-tokens/) with _Automation_ permissions
6363
4. `pnpm install`
6464
5. `pnpm run setup` to run the setup script

0 commit comments

Comments
 (0)