diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dc3e8908..8dff446b 100644 --- a/.github/workflows/CI.yml +++ b/.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: @@ -26,7 +34,9 @@ jobs: run: npm run lint test: - name: ๐Ÿงช Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ matrix.os }}) + name: + ๐Ÿงช Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ + matrix.os }}) strategy: matrix: eslint: [8] @@ -73,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 }} diff --git a/package.json b/package.json index ff5b7cc0..8dd401b2 100644 --- a/package.json +++ b/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",