Skip to content

Commit 4aa041b

Browse files
committed
chore: release-please
1 parent 241323d commit 4aa041b

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

.github/release-please/config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"plugins": ["node-workspace"],
3+
"bump-minor-pre-major": true,
4+
"packages": {
5+
"packages/autofix": { "release-type": "node" },
6+
"packages/no-autofix": { "release-type": "node" },
7+
"packages/web": { "release-type": "node" }
8+
}
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"packages/autofix": "1.1.0",
3+
"packages/no-autofix": "1.2.3",
4+
"packages/web": "0.0.3"
5+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
name: release-please
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
id-token: write
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: GoogleCloudPlatform/release-please-action@v4
18+
id: release
19+
with:
20+
token: ${{secrets.GITHUB_TOKEN}}
21+
config-file: .github/release-please/config.json
22+
manifest-file: .github/release-please/manifest.json
23+
24+
# Output which releases were created
25+
- run: echo "A release was created."
26+
if: ${{ steps.release.outputs.releases_created }}
27+
28+
# Check to see if we need to do any releases and if so check out the repo
29+
- uses: actions/checkout@v4
30+
if: ${{ steps.release.outputs.releases_created }}
31+
32+
# Node.js release
33+
- uses: actions/setup-node@v4
34+
if: ${{ steps.release.outputs.releases_created }}
35+
with:
36+
node-version: lts/*
37+
registry-url: "https://registry.npmjs.org"
38+
39+
#-----------------------------------------------------------------------------
40+
# eslint-plugin-autofix
41+
#-----------------------------------------------------------------------------
42+
43+
- name: Publish eslint-plugin-autofix package to npm
44+
run: npm publish -w packages/autofix
45+
if: ${{ steps.release.outputs['packages/autofix--release_created'] }}
46+
env:
47+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
48+
49+
#-----------------------------------------------------------------------------
50+
# eslint-plugin-no-autofix
51+
#-----------------------------------------------------------------------------
52+
53+
- name: Publish eslint-plugin-no-autofix package to npm
54+
run: npm publish -w packages/no-autofix
55+
if: ${{ steps.release.outputs['packages/no-autofix--release_created'] }}
56+
env:
57+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
58+
59+
#-----------------------------------------------------------------------------
60+
# eslint-plugin-web
61+
#-----------------------------------------------------------------------------
62+
63+
- name: Publish eslint-plugin-web package to npm
64+
run: npm publish -w packages/web
65+
if: ${{ steps.release.outputs['packages/web--release_created'] }}
66+
env:
67+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)