Skip to content

Commit

Permalink
chore(CI): add automatic release (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Oct 13, 2022
1 parent c970565 commit 04fa169
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
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

0 comments on commit 04fa169

Please sign in to comment.