Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): add automatic release #379

Merged
merged 1 commit into from Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/CI.yml
@@ -1,6 +1,14 @@
name: CI
on:
push:
branches:
# default semantic-release branches
- +([0-9])?(.{+([0-9]),x}).x
- main
- next
- next-major
- beta
- alpha
pull_request:

jobs:
Expand Down Expand Up @@ -75,3 +83,40 @@ 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-promise' &&
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/cancel-workflow-action@0.11.0

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

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

- 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
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-promise",
"version": "6.0.2",
"version": "0.0.0-semantically-released",
"description": "Enforce best practices for JavaScript promises",
"keywords": [
"eslint",
Expand Down