Skip to content

Commit

Permalink
chore(CI): add automatic release (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Jan 31, 2023
1 parent eea507b commit 52628c3
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
49 changes: 48 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: CI
on:
push:
branches: [main]
branches:
# default semantic-release branches
- +([0-9])?(.{+([0-9]),x}).x
- main
- next
- next-major
- beta
- alpha
pull_request:
schedule:
- cron: 0 0 * * 0
Expand Down Expand Up @@ -110,3 +117,43 @@ jobs:

- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v3

release:
name: 🚀 Release
needs: [ lint, test ]
runs-on: ubuntu-latest
if:
github.repository == 'eslint-community/eslint-plugin-eslint-comments' &&
contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha',
github.ref) && github.event_name == 'push'
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: 📥 Install dependencies
run: npm install --legacy-peer-deps

- name: 🚀 Release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-community/eslint-plugin-eslint-comments",
"version": "3.2.0",
"version": "0.0.0-semantically-released",
"description": "Additional ESLint rules for ESLint directive comments.",
"engines": {
"node": ">=6.5.0"
Expand Down

0 comments on commit 52628c3

Please sign in to comment.