Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Sep 25, 2024
1 parent c3fd1e6 commit 3b77120
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release
on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Determine new version
id: new_version
run: |
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ def bumpVersionTo(version) {
task setConventionalVersion() {
doFirst {
def nextVersion = se.bjurr.gitchangelog.api.GitChangelogApi.gitChangelogApiBuilder()
.withFromRepo(file('.'))
.withSemanticMajorVersionPattern("^[Bb]reak")
.withSemanticMinorVersionPattern("^[Ff]eat")
.getNextSemanticVersion()
.getVersion();
.withFromRepo(file('.'))
.withSemanticMajorVersionPattern("^[Bb]reak")
.withSemanticMinorVersionPattern("^[Ff]eat")
.getNextSemanticVersion()
.getVersion();
def nextSnapshot = "${nextVersion}-SNAPSHOT"
logger.lifecycle("Setting version ${nextSnapshot}...")
bumpVersionTo(nextSnapshot)
Expand Down

0 comments on commit 3b77120

Please sign in to comment.