diff --git a/.github/release-please/config.json b/.github/release-please/config.json new file mode 100644 index 0000000000..336265d436 --- /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 0000000000..fec78d6aef --- /dev/null +++ b/.github/release-please/manifest.json @@ -0,0 +1 @@ +{".":"10.7.0"} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000000..f4ab2854c9 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,49 @@ +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 + environment: npm + 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' + + - name: Install dependencies + run: npm ci --ignore-scripts --force --no-fund --no-audit + + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}