Skip to content

Commit

Permalink
ci: add release-please action (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
yshrsmz authored Nov 11, 2023
1 parent 61d458d commit 60d1f95
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pr-title-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "pr-title-validation"

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

jobs:
validate_pr_title:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
with:
# Use the following release types to match the same rules in the PR title lint
# https://github.com/googleapis/release-please/blob/main/src/changelog-notes.ts#L42-L55
types: |
feat
fix
perf
deps
revert
docs
style
chore
refactor
test
build
ci
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: release-please

on:
push:
branches:
- main

permissions: {}

jobs:
release_please:

runs-on: ubuntu-latest

outputs:
release_created: ${{ steps.release.outputs.release_created }}

steps:
- uses: google-github-actions/[email protected]
id: release
with:
changelog-types: |
[
{"type":"build","section":"Build System","hidden":false},
{"type":"chore","section":"Miscellaneous","hidden":false},
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"perf","section":"Performance Improvements","hidden":false},
{"type":"refactor","section":"Refactoring","hidden":false},
{"type":"revert","section":"Reverts","hidden":false}
]
release-type: simple
extra-files: |
./gradle.properties
token: ${{ secrets.WORKFLOW_TOKEN }}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
kotlin.code.style=official
#
GROUP=com.codingfeline.buildkonfig
# x-release-please-start-version
VERSION_NAME=0.15.0
# x-release-please-end
#
POM_URL=https://github.com/yshrsmz/BuildKonfig/
POM_SCM_URL=https://github.com/yshrsmz/BuildKonfig/
Expand Down

0 comments on commit 60d1f95

Please sign in to comment.