diff --git a/.github/workflows/conventional-title.yml b/.github/workflows/conventional-title.yml new file mode 100644 index 00000000..cf9add8b --- /dev/null +++ b/.github/workflows/conventional-title.yml @@ -0,0 +1,25 @@ +name: Lint PR title + +on: + pull_request: + types: + - opened + - edited + - synchronize + branches: + - 'main' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4 + + - name: Install dependencies + run: npm install @commitlint/cli @commitlint/config-conventional + + - name: Validate PR title + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: echo "$PR_TITLE" | npx commitlint --config commitlint.config.js \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..0c5b7cac --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,16 @@ +name: Draft a Trestle-Bot release PR + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + release-please: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # 4.1.3 \ No newline at end of file diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..04e745b4 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.10.1" +} \ No newline at end of file diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 00000000..3347cb96 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1 @@ +module.exports = {extends: ['@commitlint/config-conventional']}; diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..20a4b9e2 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,33 @@ +{ + "packages": { + ".": { + "release-type": "python", + "include-v-in-tag": true, + "bump-minor-pre-major": true, + "draft": true, + "changelog-path": "CHANGELOG.md", + "changelog-sections": [ + { + "type": "feat", + "section": "Features", + "hidden": false + }, + { + "type": "fix", + "section": "Bug Fixes", + "hidden": false + }, + { + "type": "chore", + "section": "Maintenance", + "hidden": false + }, + { + "ci": "ci", + "section": "Infrastructure", + "hidden": false + } + ] + } + } +} \ No newline at end of file