Skip to content

Commit

Permalink
Optimizing gh actions and build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
sbglasius committed Sep 17, 2024
1 parent ff335fa commit 5b0f491
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
env:
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }}
with:
arguments: -Pversion=${RELEASE_VERSION} :docs:asciidoctor
arguments: -Pversion=${RELEASE_VERSION} asciidoctor
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
with:
distribution: temurin
java-version: 11
- uses: gradle/gradle-build-action@v2
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build and publish snapshot
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
with:
arguments: publish
run: ./gradlew publish
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
- uses: micronaut-projects/github-actions/pre-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish to Sonatype OSSRH
if: ${{ env.ACT }} # prevent deploy using gh act
env:
Expand Down Expand Up @@ -69,6 +71,8 @@ jobs:
with:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Set version in gradle.properties
run: |
echo "Preparing next snapshot as ${NEXT_VERSION}"
Expand Down Expand Up @@ -97,9 +101,10 @@ jobs:
distribution: temurin
- uses: micronaut-projects/github-actions/export-gradle-properties@master
id: asciidoctor
- uses: gradle/gradle-build-action@v2
with:
arguments: -Pversion="${{ env.RELEASE_VERSION }}" asciidoctor
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build documentation
run: ./gradlew -Pversion="${{ env.RELEASE_VERSION }}" asciidoctor
- uses: micronaut-projects/github-pages-deploy-action@master
if: success()
env:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ publishing {
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = 'release-demo'
artifactId = project.name
version = project.version

from components.java
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ repositories {
dependencies {
implementation("org.grails:grails-gradle-plugin:6.1.2")
implementation("org.grails.plugins:hibernate5:8.1.0")
implementation 'org.grails:grails-shell:6.1.2'

}

0 comments on commit 5b0f491

Please sign in to comment.