Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add release-please action #110

Merged
merged 3 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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