Skip to content

Commit

Permalink
gh-actions: Release version settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sbglasius committed Dec 29, 2023
1 parent baf5951 commit 9410284
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
SIGN_PASSWORD: ${{ secrets.SIGNING_PASSPHRASE }}
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }}
with:
arguments: -info -Prelease=true :i18n-enums:publishToSonatype closeAndReleaseSonatypeStagingRepository
arguments: -Pversion=${RELEASE_VERSION} publishToSonatype closeAndReleaseSonatypeStagingRepository
- name: Bump patch version by one
uses: flatherskevin/semver-action@v1
id: version
Expand Down
27 changes: 12 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ plugins {
id "maven-publish"
}

allprojects {
subprojects {

group "dk.glasius"

ext {
isBuildSnapshot = version.toString().endsWith("-SNAPSHOT")
isReleaseVersion = !isBuildSnapshot
}

repositories {
mavenLocal()
mavenCentral()
Expand All @@ -39,19 +38,17 @@ allprojects {
}
}

if (project.isReleaseVersion) {
nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : ''
nexusUrl = uri("https://oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
}
nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : ''
nexusUrl = uri("https://oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
title=I18n Enums
projectVersion=6.0.0

version=6.0.0
projectDesc=Adds an annotation usable on Enums to easy add and implement the MessageSourceResolvable interface in an standard way throughout a grails project.
projectUrl=https://github.com/sbglasius/i18n-enums
developers=Søren Berg Glasius, Burt Beckwith, James Daugherty
Expand Down

0 comments on commit 9410284

Please sign in to comment.