Skip to content

Commit

Permalink
chore: add release-please (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Oct 4, 2024
1 parent 12f9d9b commit da70f2b
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pull-request-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pull Request

on:
merge_group:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
conventional-title:
name: Validate PR title is Conventional Commit
runs-on: ubuntu-latest
steps:
- name: Check title
if: github.event_name == 'pull_request_target'
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
chore
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

on:
push:
branches:
- main

jobs:
release-please:
name: Create Release
outputs:
release-pr: ${{ steps.release.outputs.pr }}
tag-name: ${{ steps.release.outputs.tag_name }}
runs-on: ubuntu-latest
steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: manifest
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.3.1"
}
16 changes: 16 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"pull-request-title-pattern": "chore: Release ${version}",
"group-pull-request-title-pattern": "chore: Release ${version}",
"packages": {
".": {
"release-type": "simple",
"include-component-in-tag": false
}
},
"plugins": [
"sentence-case"
]
}

0 comments on commit da70f2b

Please sign in to comment.