Skip to content

Commit 2b33b28

Browse files
committed
chore(CI): add automatic release
1 parent 5c44fe8 commit 2b33b28

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,37 @@ jobs:
7272
- name: ⬆️ Upload coverage report
7373
uses: codecov/codecov-action@v3
7474

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

0 commit comments

Comments
 (0)