Skip to content

Commit 21e960b

Browse files
committed
chore: fix release workflow
1 parent e81c9b9 commit 21e960b

File tree

8 files changed

+44
-118
lines changed

8 files changed

+44
-118
lines changed

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint
1+
name: CI
22
on:
33
pull_request:
44
branches:
@@ -8,9 +8,11 @@ on:
88
- main
99

1010
jobs:
11-
build-and-release:
11+
release:
1212
name: Release
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1416
steps:
1517
- uses: actions/checkout@v4
1618
with:
@@ -33,11 +35,9 @@ jobs:
3335
npm whoami
3436
env:
3537
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36-
- name: build
37-
run: pnpm build
3838
- name: release package
3939
if: ${{ success() && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
40-
run: pnpm release --dry-run
40+
run: pnpm release --npm.skipChecks
4141
env:
4242
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4343
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
# FRSOURCE Tooling
1+
# FRSOURCE Toolkit
22

3-
A repository that holds configuration files for tooling used throughout the FRSOURCE organization.
3+
A repository that holds shared toolkit used throughout the FRSOURCE organization:
4+
5+
- configuration files,
6+
- GitHub Actions scripts.

packages/eslint/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
"peerDependencies": {
1919
"eslint": ">= 9"
2020
},
21-
"homepage": "https://github.com/FRSOURCE/tooling/",
21+
"homepage": "https://github.com/FRSOURCE/toolkit/",
2222
"repository": {
2323
"type": "git",
24-
"url": "git+https://github.com/FRSOURCE/tooling.git"
24+
"url": "git+https://github.com/FRSOURCE/toolkit.git"
2525
},
2626
"bugs": {
27-
"url": "https://github.com/FRSOURCE/tooling/issues"
27+
"url": "https://github.com/FRSOURCE/toolkit/issues"
2828
},
2929
"author": "Jakub Freisler <[email protected]>",
3030
"license": "MIT",

packages/prettier/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
"peerDependencies": {
1919
"eslint": ">= 9"
2020
},
21-
"homepage": "https://github.com/FRSOURCE/tooling/",
21+
"homepage": "https://github.com/FRSOURCE/toolkit/",
2222
"repository": {
2323
"type": "git",
24-
"url": "git+https://github.com/FRSOURCE/tooling.git"
24+
"url": "git+https://github.com/FRSOURCE/toolkit.git"
2525
},
2626
"bugs": {
27-
"url": "https://github.com/FRSOURCE/tooling/issues"
27+
"url": "https://github.com/FRSOURCE/toolkit/issues"
2828
},
2929
"author": "Jakub Freisler <[email protected]>",
3030
"license": "MIT",

packages/release-it/.release-it.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { monorepoIndependent } = require("./index.cjs");
22

33
module.exports = monorepoIndependent({
4-
name: "release-it",
4+
name: "release-it-config",
55
buildCmd: "", // no build needed
66
});

packages/release-it/monorepoIndependent.cjs

+21-11
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,39 @@ module.exports = ({
1010
path = `packages/${name}`,
1111
buildCmd = "pnpm build",
1212
}) => ({
13+
npm: {
14+
publishPath: "package-pack.tgz",
15+
},
1316
git: {
17+
requireBranch: "main",
1418
requireCommits: true,
15-
// requireCleanWorkingDir: false,
16-
// addUntrackedFiles: true,
17-
commitMessage: "chore(repo): release ${npm.name} ${version}",
19+
requireCommitsFail: false, // if there are no new commits release-it will stop the release process, but without throwing and error
20+
requireCleanWorkingDir: true,
21+
commitsPath: ".",
22+
commitMessage: "chore: release ${npm.name} ${version}",
1823
tagName: "${npm.name}-v${version}",
24+
tagMatch: "${npm.name}-v[0-9]*.[0-9]*.[0-9]*",
25+
getLatestTagFromAllRefs: false, // https://github.com/release-it/release-it/blob/main/docs/git.md#use-all-refs-to-determine-latest-tag
26+
},
27+
github: {
28+
release: true,
29+
comments: {
30+
submit: true,
31+
issue:
32+
":rocket: _This issue has been resolved in ${npm.name}@${version}. See [${releaseName}](${releaseUrl}) for release notes._",
33+
pr: ":rocket: _This pull request is included in ${npm.name}@${version}. See [${releaseName}](${releaseUrl}) for release notes._",
34+
},
1935
},
2036
plugins: {
2137
"@release-it/conventional-changelog": {
2238
gitRawCommitsOpts: {
2339
path,
2440
},
2541
},
26-
"@release-it/bumper": {
27-
in: "version.json",
28-
out: ["version.json", "dist/**/package.json"],
29-
},
3042
},
3143
hooks: {
3244
"before:bump": buildCmd,
33-
"after:bump": [
34-
"git checkout -- package.json", // check out package.json
35-
"git checkout -- pnpm-lock.yaml", // check out package-lock.json
36-
],
45+
"before:npm:release": "mv $(pnpm pack) package-pack.tgz",
46+
"after:npm:release": "rm package-pack.tgz",
3747
},
3848
});

packages/release-it/package.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
22
"name": "@frsource/release-it-config",
33
"version": "1.0.0",
4-
"main": "dist/index.cjs",
5-
"types": "dist/index.d.ts",
4+
"main": "index.cjs",
65
"type": "module",
76
"scripts": {
87
"release": "release-it"
98
},
109
"dependencies": {
11-
"@release-it/bumper": "^6.0.1",
1210
"@release-it/conventional-changelog": "^8.0.1"
1311
},
1412
"devDependencies": {
@@ -17,13 +15,13 @@
1715
"peerDependencies": {
1816
"release-it": ">= 17"
1917
},
20-
"homepage": "https://github.com/FRSOURCE/tooling/",
18+
"homepage": "https://github.com/FRSOURCE/toolkit/",
2119
"repository": {
2220
"type": "git",
23-
"url": "git+https://github.com/FRSOURCE/tooling.git"
21+
"url": "git+https://github.com/FRSOURCE/toolkit.git"
2422
},
2523
"bugs": {
26-
"url": "https://github.com/FRSOURCE/tooling/issues"
24+
"url": "https://github.com/FRSOURCE/toolkit/issues"
2725
},
2826
"author": "Jakub Freisler <[email protected]>",
2927
"license": "MIT",

pnpm-lock.yaml

+2-87
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)