Skip to content

Commit ac1df13

Browse files
committed
chore(CI): add automatic release
1 parent be24f56 commit ac1df13

File tree

2 files changed

+48
-2
lines changed

2 files changed

+48
-2
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
name: CI
22
on:
33
push:
4-
branches: [main]
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
512
pull_request:
613
schedule:
714
- cron: 0 0 * * 0
@@ -58,3 +65,42 @@ jobs:
5865

5966
- name: ⬆️ Upload coverage report
6067
uses: codecov/codecov-action@v3
68+
69+
release:
70+
name: 🚀 Release
71+
needs: [lint, test]
72+
runs-on: ubuntu-latest
73+
if: github.repository == 'eslint-community/eslint-utils' &&
74+
contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha',
75+
github.ref) && github.event_name == 'push'
76+
steps:
77+
- name: 🛑 Cancel Previous Runs
78+
uses: styfle/[email protected]
79+
80+
- name: ⬇️ Checkout repo
81+
uses: actions/checkout@v3
82+
83+
- name: ⎔ Setup Node
84+
uses: actions/setup-node@v3
85+
with:
86+
node-version: 18
87+
88+
- name: 📥 Install dependencies
89+
run: npm install
90+
91+
- name: 🚀 Release
92+
uses: cycjimmy/semantic-release-action@v3
93+
with:
94+
semantic_version: 19
95+
branches: |
96+
[
97+
'+([0-9])?(.{+([0-9]),x}).x',
98+
'main',
99+
'next',
100+
'next-major',
101+
{name: 'beta', prerelease: true},
102+
{name: 'alpha', prerelease: true}
103+
]
104+
env:
105+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "regexpp",
3-
"version": "3.2.0",
3+
"version": "0.0.0-semantically-released",
44
"description": "Regular expression parser for ECMAScript.",
55
"engines": {
66
"node": ">=8"

0 commit comments

Comments
 (0)