Skip to content

Commit 09b1614

Browse files
committed
chore(CI): add automatic release
1 parent 296418c commit 09b1614

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
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-1
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",

0 commit comments

Comments
 (0)