This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch wrapper-rewrite
in repository https://gitbox.apache.org/repos/asf/grails-forge.git


The following commit(s) were added to refs/heads/wrapper-rewrite by this push:
     new 8850052  Restore publishing
8850052 is described below

commit 8850052dfc338e192eea4901adcab4ba309c8fe9
Author: James Daugherty <jdaughe...@jdresources.net>
AuthorDate: Wed May 14 14:14:09 2025 -0400

    Restore publishing
---
 .github/workflows/gradle.yml  | 25 +++++++++++++++++++++++++
 .github/workflows/release.yml | 23 +++++++++++++++++++++--
 2 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
index 68b0f3c..82753cf 100644
--- a/.github/workflows/gradle.yml
+++ b/.github/workflows/gradle.yml
@@ -64,3 +64,28 @@ jobs:
         with:
           name: grails-cli-snapshot
           path: cli.zip
+  publish:
+    if: github.repository_owner == 'apache' && github.event_name == 'push'
+    needs: [ build ]
+    runs-on: ubuntu-24.04
+    steps:
+      - name: "📥 Checkout repository"
+        uses: actions/checkout@v4
+      - name: 'Ensure Common Build Date' # to ensure a reproducible build
+        run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> 
"$GITHUB_ENV"
+      - name: "☕️ Setup JDK"
+        uses: actions/setup-java@v4
+        with:
+          distribution: liberica
+          java-version: 17
+      - name: "🐘 Setup Gradle"
+        uses: gradle/actions/setup-gradle@v4
+        with:
+          develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY  }}
+      - name: "📤 Publish Grails-Core Snapshot Artifacts"
+        env:
+          GRAILS_PUBLISH_RELEASE: 'false'
+          MAVEN_PUBLISH_URL: ${{ secrets.GRAILS_NEXUS_PUBLISH_SNAPSHOT_URL }}
+          MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
+          MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW  }}
+        run: ./gradlew publish
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 82cd5ce..9a05c31 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -22,7 +22,7 @@ jobs:
     name: "Release artifacts to GitHub release and SDKMAN plus publish source 
& documentation"
     runs-on: ubuntu-latest
     permissions:
-      contents: write  #  to create release
+      contents: write  #  to create release & upload wrapper
       issues: write  #  to modify milestones
     outputs:
       release_version: ${{ steps.release_version.outputs.value }}
@@ -48,7 +48,7 @@ jobs:
           RELEASE_VERSION: ${{ needs.publish.outputs.release_version }}
           RELEASE_SCRIPT_PATH: '.github/scripts/setReleasedGrailsVersion.sh'
       - name: "🔨 Build All"
-        run: ./gradlew grails-forge-cli:assemble
+        run: ./gradlew assemble
       - name: "📦 Generate Docs"
         run: >
           ./gradlew
@@ -63,6 +63,25 @@ jobs:
           asset_path: grails-cli/build/distributions/grails-cli-${{ 
steps.release_version.outputs.value }}.zip
           asset_name: grails-cli-${{ steps.release_version.outputs.value }}.zip
           asset_content_type: application/zip
+      - name: "🔐 Generate secring file"
+        env:
+          SECRING_FILE: ${{ secrets.SECRING_FILE }}
+        run: echo $SECRING_FILE | base64 -d > ${{ github.workspace 
}}/secring.gpg
+      - name: "📤 Publish to Sonatype OSSRH"
+        id: publish
+        env:
+          GRAILS_PUBLISH_RELEASE: 'true'
+          NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
+          NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
+          NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
+          NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ 
secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
+          SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
+          SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
+        run: >
+          ./gradlew
+          -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg 
+          publishToSonatype 
+          closeSonatypeStagingRepository
       - name: "🚀 Publish to Github Pages"
         if: success()
         uses: grails/grails-github-actions/deploy-github-pages@asf

Reply via email to