Skip to content

Commit 6d0fd54

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

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/main.yml

+43
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,38 @@ 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: github.repository == 'eslint-community/eslint-plugin-eslint-plugin' &&
89+
contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha',
90+
github.ref) && github.event_name == 'push'
91+
steps:
92+
- name: 🛑 Cancel Previous Runs
93+
uses: styfle/[email protected]
94+
95+
- name: ⬇️ Checkout repo
96+
uses: actions/checkout@v3
97+
98+
- name: ⎔ Setup node
99+
uses: actions/setup-node@v3
100+
with:
101+
node-version: 18
102+
103+
- name: 🚀 Release
104+
uses: cycjimmy/semantic-release-action@v3
105+
with:
106+
semantic_version: 19
107+
branches: |
108+
[
109+
'+([0-9])?(.{+([0-9]),x}).x',
110+
'main',
111+
'next',
112+
'next-major',
113+
{name: 'beta', prerelease: true},
114+
{name: 'alpha', prerelease: true}
115+
]
116+
env:
117+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118+
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)