diff --git a/.github/workflows/commit-message-validation.yml b/.github/workflows/commit-message-validation.yml new file mode 100644 index 0000000..5844263 --- /dev/null +++ b/.github/workflows/commit-message-validation.yml @@ -0,0 +1,17 @@ +name: Commit Message Validation + +on: + pull_request: + +jobs: + validate: + name: Validate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: webiny/action-conventional-commits@v1.3.0 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b20ebe7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + id-token: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Release Please + uses: google-github-actions/release-please-action@v4 + id: release + + - name: Use Node 22.x + uses: actions/setup-node@v4 + if: ${{ steps.release.outputs.release_created }} + with: + node-version: 22 + registry-url: 'https://registry.npmjs.org' + + - name: Install Deps + run: npm install + if: ${{ steps.release.outputs.release_created }} + + - name: NPM Publish + run: npm publish --provenance --access public + if: ${{ steps.release.outputs.release_created }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88dab2a..81069fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,10 +19,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..c0f5510 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.5.0" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..84f5889 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,73 @@ +{ + "packages": { + ".": { + "release-type": "node", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "draft": false, + "prerelease": false, + "draft-pull-request": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "separate-pull-requests": false, + "skip-github-release": false, + "versioning": "default", + "pull-request-header": ":robot: I have created a release *beep* *boop*", + "pull-request-title-pattern": "chore${scope}: release${component} ${version}", + "changelog-path": "CHANGELOG.md", + "changelog-host": "https://github.com", + "changelog-type": "default", + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "feature", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styles" + }, + { + "type": "chore", + "section": "Miscellaneous Chores" + }, + { + "type": "refactor", + "section": "Code Refactoring" + }, + { + "type": "test", + "section": "Tests" + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "Continuous Integration" + } + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}