Skip to content

Commit 0515dba

Browse files
committed
chore(CI): add automatic release
1 parent e6edc35 commit 0515dba

File tree

2 files changed

+48
-21
lines changed

2 files changed

+48
-21
lines changed

.github/workflows/main.yml

+47
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: CI
22
on:
33
push:
4+
branches:
5+
# default semantic-release branches
6+
- +([0-9])?(.{+([0-9]),x}).x
7+
- main
8+
- next
9+
- next-major
10+
- beta
11+
- alpha
412
pull_request:
513

614
jobs:
@@ -73,3 +81,42 @@ jobs:
7381
- name: ⬆️ Upload coverage report
7482
uses: codecov/codecov-action@v3
7583

84+
release:
85+
name: 🚀 Release
86+
needs: [lint, test]
87+
runs-on: ubuntu-latest
88+
if:
89+
github.repository == 'eslint-community/eslint-plugin-eslint-plugin' &&
90+
contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha',
91+
github.ref) && github.event_name == 'push'
92+
steps:
93+
- name: 🛑 Cancel Previous Runs
94+
uses: styfle/[email protected]
95+
96+
- name: ⬇️ Checkout repo
97+
uses: actions/checkout@v3
98+
99+
- name: ⎔ Setup node
100+
uses: actions/setup-node@v3
101+
with:
102+
node-version: 18
103+
104+
- name: 📥 Install dependencies
105+
run: npm install
106+
107+
- name: 🚀 Release
108+
uses: cycjimmy/semantic-release-action@v3
109+
with:
110+
semantic_version: 19
111+
branches: |
112+
[
113+
'+([0-9])?(.{+([0-9]),x}).x',
114+
'main',
115+
'next',
116+
'next-major',
117+
{name: 'beta', prerelease: true},
118+
{name: 'alpha', prerelease: true}
119+
]
120+
env:
121+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-eslint-plugin",
3-
"version": "5.0.6",
3+
"version": "0.0.0-semantically-released",
44
"description": "An ESLint plugin for linting ESLint plugins",
55
"author": "Teddy Katz",
66
"main": "./lib/index.js",
@@ -15,7 +15,6 @@
1515
"lint:eslint-docs": "npm-run-all \"update:eslint-docs --check\"",
1616
"lint:js": "eslint --cache .",
1717
"lint:package-json": "npmPkgJsonLint .",
18-
"release": "release-it",
1918
"test": "nyc --all --check-coverage --include lib mocha tests --recursive",
2019
"update:eslint-docs": "eslint-doc-generator --rule-doc-section-include \"Rule Detail\" --ignore-config all --ignore-config rules --ignore-config rules-recommended --ignore-config tests --ignore-config tests-recommended"
2120
},
@@ -48,7 +47,6 @@
4847
"devDependencies": {
4948
"@commitlint/cli": "^17.1.2",
5049
"@commitlint/config-conventional": "^17.1.0",
51-
"@release-it/conventional-changelog": "^4.3.0",
5250
"@typescript-eslint/parser": "^5.36.2",
5351
"chai": "^4.3.6",
5452
"dirty-chai": "^2.0.1",
@@ -72,30 +70,12 @@
7270
"npm-run-all": "^4.1.5",
7371
"nyc": "^15.1.0",
7472
"prettier": "^2.7.1",
75-
"release-it": "^14.14.3",
7673
"typescript": "^4.8.3"
7774
},
7875
"peerDependencies": {
7976
"eslint": ">=7.0.0"
8077
},
8178
"engines": {
8279
"node": "^14.17.0 || ^16.0.0 || >= 18.0.0"
83-
},
84-
"release-it": {
85-
"git": {
86-
"commitMessage": "chore: release v${version}"
87-
},
88-
"plugins": {
89-
"@release-it/conventional-changelog": {
90-
"preset": "conventionalcommits",
91-
"infile": "CHANGELOG.md"
92-
}
93-
},
94-
"github": {
95-
"release": true
96-
},
97-
"npm": {
98-
"skipChecks": true
99-
}
10080
}
10181
}

0 commit comments

Comments
 (0)