Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
- run: pnpm build
- env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: JoshuaKGoldberg/release-it-action@dc71f396c291f62f9a17701cfc4d4a3e7c263020 # v0.3.2

name: Release
Expand Down
2 changes: 1 addition & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"requireCommits": true
},
"github": { "release": true, "releaseName": "v${version}" },
"npm": { "publishArgs": ["--access public", "--provenance"] },
"npm": { "skipChecks": true },
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
Expand Down
3 changes: 1 addition & 2 deletions docs/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ The setup script will by default:

You'll then need to manually go through the following two steps to set up tooling on GitHub:

1. Create two tokens in [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) _(unless you chose to opt out of releases)_:
1. Create one token in [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) _(unless you chose to opt out of releases)_:
- `ACCESS_TOKEN`: A [GitHub PAT](https://github.com/settings/tokens/new) with _repo_ and _workflow_ permissions
- `NPM_TOKEN`: An [npm access token](https://docs.npmjs.com/creating-and-viewing-access-tokens/) with _Automation_ permissions
2. Install two GitHub apps:
- [Codecov](https://github.com/marketplace/codecov) _(unless you chose to opt out of tests)_
- [Renovate](https://github.com/marketplace/renovate) _(unless you chose to opt out of renovate)_
Expand Down
3 changes: 1 addition & 2 deletions docs/Transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ For example, if the repository previously using Jest for testing:

You'll then need to manually go through the following two steps to set up tooling on GitHub:

1. Create two tokens in [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) _(unless you chose to opt out of releases)_:
1. Create one token in [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) _(unless you chose to opt out of releases)_:
- `ACCESS_TOKEN`: A [GitHub PAT](https://github.com/settings/tokens/new) with _repo_ and _workflow_ permissions
- `NPM_TOKEN`: An [npm access token](https://docs.npmjs.com/creating-and-viewing-access-tokens/) with _Automation_ permissions
2. Install two GitHub apps:
- [Codecov](https://github.com/marketplace/codecov) _(unless you chose to opt out of tests)_
- [Renovate](https://github.com/marketplace/renovate) _(unless you chose to opt out of renovate)_
Expand Down
3 changes: 1 addition & 2 deletions docs/UseThisTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ npx create-typescript-app

You'll then need to manually go through the following two steps to set up tooling on GitHub:

1. Create two tokens in [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) _(unless you chose to opt out of releases)_:
1. Create one token in [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) _(unless you chose to opt out of releases)_:
- `ACCESS_TOKEN`: A [GitHub PAT](https://github.com/settings/tokens/new) with _repo_ and _workflow_ permissions
- `NPM_TOKEN`: An [npm access token](https://docs.npmjs.com/creating-and-viewing-access-tokens/) with _Automation_ permissions
2. Install two GitHub apps:
- [Codecov](https://github.com/marketplace/codecov) _(unless you chose to opt out of tests)_
- [Renovate](https://github.com/marketplace/renovate) _(unless you chose to opt out of renovate)_
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,5 @@
"packageManager": "[email protected]",
"engines": {
"node": ">=20.19.0"
},
"publishConfig": {
"provenance": true
}
}
28 changes: 10 additions & 18 deletions src/blocks/blockReleaseIt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ describe("blockReleaseIt", () => {
"@release-it/conventional-changelog": "10.0.2",
"release-it": "19.0.6",
},
"publishConfig": {
"provenance": true,
},
"scripts": {
"should-semantic-release": undefined,
},
Expand All @@ -47,10 +44,6 @@ describe("blockReleaseIt", () => {
"description": "a GitHub PAT with repo and workflow permissions",
"name": "ACCESS_TOKEN",
},
{
"description": "an npm access token with automation permissions",
"name": "NPM_TOKEN",
},
],
},
"block": [Function],
Expand Down Expand Up @@ -110,7 +103,6 @@ describe("blockReleaseIt", () => {
- uses: ./.github/actions/prepare
- env:
GITHUB_TOKEN: \${{ secrets.ACCESS_TOKEN }}
NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
uses: JoshuaKGoldberg/[email protected]


Expand All @@ -129,8 +121,12 @@ describe("blockReleaseIt", () => {
",
},
},
".release-it.json": "{"git":{"commitMessage":"chore: release v\${version}","requireCommits":true},"github":{"release":true,"releaseName":"v\${version}"},"npm":{"publishArgs":["--access public","--provenance"]},"plugins":{"@release-it/conventional-changelog":{"infile":"CHANGELOG.md","preset":"conventionalcommits","types":[{"section":"Features","type":"feat"},{"section":"Bug Fixes","type":"fix"},{"section":"Performance Improvements","type":"perf"},{"hidden":true,"type":"build"},{"hidden":true,"type":"chore"},{"hidden":true,"type":"ci"},{"hidden":true,"type":"docs"},{"hidden":true,"type":"refactor"},{"hidden":true,"type":"style"},{"hidden":true,"type":"test"}]}}}",
".release-it.json": "{"git":{"commitMessage":"chore: release v\${version}","requireCommits":true},"github":{"release":true,"releaseName":"v\${version}"},"npm":{"skipChecks":true},"plugins":{"@release-it/conventional-changelog":{"infile":"CHANGELOG.md","preset":"conventionalcommits","types":[{"section":"Features","type":"feat"},{"section":"Bug Fixes","type":"fix"},{"section":"Performance Improvements","type":"perf"},{"hidden":true,"type":"build"},{"hidden":true,"type":"chore"},{"hidden":true,"type":"ci"},{"hidden":true,"type":"docs"},{"hidden":true,"type":"refactor"},{"hidden":true,"type":"style"},{"hidden":true,"type":"test"}]}}}",
},
"suggestions": [
"- add test-owner/test-repository and \`release.yaml\` as a Trusted Publisher on:
https://www.npmjs.com/package/test-repository/access",
],
}
`);
});
Expand Down Expand Up @@ -166,9 +162,6 @@ describe("blockReleaseIt", () => {
"@release-it/conventional-changelog": "10.0.2",
"release-it": "19.0.6",
},
"publishConfig": {
"provenance": true,
},
"scripts": {
"should-semantic-release": undefined,
},
Expand All @@ -195,10 +188,6 @@ describe("blockReleaseIt", () => {
"description": "a GitHub PAT with repo and workflow permissions",
"name": "ACCESS_TOKEN",
},
{
"description": "an npm access token with automation permissions",
"name": "NPM_TOKEN",
},
],
},
"block": [Function],
Expand Down Expand Up @@ -261,7 +250,6 @@ describe("blockReleaseIt", () => {
- run: two
- env:
GITHUB_TOKEN: \${{ secrets.ACCESS_TOKEN }}
NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
uses: JoshuaKGoldberg/[email protected]


Expand All @@ -280,8 +268,12 @@ describe("blockReleaseIt", () => {
",
},
},
".release-it.json": "{"git":{"commitMessage":"chore: release v\${version}","requireCommits":true},"github":{"release":true,"releaseName":"v\${version}"},"npm":{"publishArgs":["--access public","--provenance"]},"plugins":{"@release-it/conventional-changelog":{"infile":"CHANGELOG.md","preset":"conventionalcommits","types":[{"section":"Features","type":"feat"},{"section":"Bug Fixes","type":"fix"},{"section":"Performance Improvements","type":"perf"},{"hidden":true,"type":"build"},{"hidden":true,"type":"chore"},{"hidden":true,"type":"ci"},{"hidden":true,"type":"docs"},{"hidden":true,"type":"refactor"},{"hidden":true,"type":"style"},{"hidden":true,"type":"test"}]}}}",
".release-it.json": "{"git":{"commitMessage":"chore: release v\${version}","requireCommits":true},"github":{"release":true,"releaseName":"v\${version}"},"npm":{"skipChecks":true},"plugins":{"@release-it/conventional-changelog":{"infile":"CHANGELOG.md","preset":"conventionalcommits","types":[{"section":"Features","type":"feat"},{"section":"Bug Fixes","type":"fix"},{"section":"Performance Improvements","type":"perf"},{"hidden":true,"type":"build"},{"hidden":true,"type":"chore"},{"hidden":true,"type":"ci"},{"hidden":true,"type":"docs"},{"hidden":true,"type":"refactor"},{"hidden":true,"type":"style"},{"hidden":true,"type":"test"}]}}}",
},
"suggestions": [
"- add test-owner/test-repository and \`release.yaml\` as a Trusted Publisher on:
https://www.npmjs.com/package/test-repository/access",
],
}
`);
});
Expand Down
18 changes: 7 additions & 11 deletions src/blocks/blockReleaseIt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ export const blockReleaseIt = base.createBlock({
"@release-it/conventional-changelog",
"release-it",
),
publishConfig: {
provenance: true,
},
scripts: {
"should-semantic-release": undefined,
},
Expand All @@ -56,10 +53,6 @@ export const blockReleaseIt = base.createBlock({
description: "a GitHub PAT with repo and workflow permissions",
name: "ACCESS_TOKEN",
},
{
description: "an npm access token with automation permissions",
name: "NPM_TOKEN",
},
],
}),
],
Expand Down Expand Up @@ -147,7 +140,6 @@ export const blockReleaseIt = base.createBlock({
{
env: {
GITHUB_TOKEN: "${{ secrets.ACCESS_TOKEN }}",
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}",
},
uses: resolveUses(
"JoshuaKGoldberg/release-it-action",
Expand All @@ -168,9 +160,7 @@ export const blockReleaseIt = base.createBlock({
release: true,
releaseName: "v${version}",
},
npm: {
publishArgs: [`--access ${options.access}`, "--provenance"],
},
npm: { skipChecks: true },
plugins: {
"@release-it/conventional-changelog": {
infile: "CHANGELOG.md",
Expand All @@ -191,6 +181,12 @@ export const blockReleaseIt = base.createBlock({
},
}),
},
suggestions: [
[
`- add ${options.owner}/${options.repository} and \`release.yaml\` as a Trusted Publisher on:`,
` https://www.npmjs.com/package/${options.repository}/access`,
].join("\n"),
],
};
},
});