diff --git a/.github/release-please/config.json b/.github/release-please/config.json new file mode 100644 index 00000000..336265d4 --- /dev/null +++ b/.github/release-please/config.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/v16.12.0/schemas/config.json", + "release-type": "node", + "include-component-in-tag": false, + "changelog-sections": [ + { "type": "feat", "section": "๐ŸŒŸ Features", "hidden": false }, + { "type": "fix", "section": "๐Ÿฉน Fixes", "hidden": false }, + { "type": "docs", "section": "๐Ÿ“š Documentation", "hidden": false }, + + { "type": "chore", "section": "๐Ÿงน Chores", "hidden": false }, + { "type": "perf", "section": "๐Ÿงน Chores", "hidden": false }, + { "type": "refactor", "section": "๐Ÿงน Chores", "hidden": false }, + { "type": "test", "section": "๐Ÿงน Chores", "hidden": false }, + + { "type": "build", "section": "๐Ÿค– Automation", "hidden": false }, + { "type": "ci", "section": "๐Ÿค– Automation", "hidden": true } + ], + "packages": { + ".": {} + } +} diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json new file mode 100644 index 00000000..8cd0d4e8 --- /dev/null +++ b/.github/release-please/manifest.json @@ -0,0 +1 @@ +{ ".": "7.0.0" } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7903ca7a..79db47f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,13 +2,7 @@ name: CI on: push: branches: - # default semantic-release branches - - +([0-9])?(.{+([0-9]),x}).x - main - - next - - next-major - - beta - - alpha pull_request: concurrency: @@ -26,10 +20,10 @@ jobs: - name: โŽ” Setup Node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: lts/* - name: ๐Ÿ“ฅ Install dependencies - run: npm install + run: npm ci - name: โ–ถ๏ธ Run lint script run: npm run lint @@ -81,40 +75,3 @@ jobs: - name: โฌ†๏ธ Upload coverage report uses: codecov/codecov-action@v4 - - 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: โฌ‡๏ธ Checkout repo - uses: actions/checkout@v4 - - - name: โŽ” Setup node - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: ๐Ÿ“ฅ Install dependencies - run: npm install - - - name: ๐Ÿš€ Release - uses: cycjimmy/semantic-release-action@v4 - 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/.github/workflows/format.yml b/.github/workflows/format.yml index 0b3cffd8..727900e5 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -21,10 +21,10 @@ jobs: - name: โŽ” Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: lts/* - name: ๐Ÿ“ฅ Install deps - run: npm install + run: npm ci - name: ๐Ÿ‘” Format run: npm run format diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..cab30d2a --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,45 @@ +name: Release Please + +on: + push: + branches: + - main + +permissions: + contents: read + +jobs: + release_please: + name: release-please + runs-on: ubuntu-latest + outputs: + releaseCreated: ${{ steps.release.outputs.release_created }} + permissions: + contents: write + pull-requests: write + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + config-file: .github/release-please/config.json + manifest-file: .github/release-please/manifest.json + + npm_publish: + name: Publish to npm + runs-on: ubuntu-latest + needs: release_please + if: needs.release_please.outputs.releaseCreated + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - uses: actions/setup-node@v4 + with: + node-version: lts/* + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 39fdb279..f6003dc7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-promise", - "version": "0.0.0-semantically-released", + "version": "7.0.0", "description": "Enforce best practices for JavaScript promises", "keywords": [ "eslint",