matrei commented on code in PR #6:
URL: 
https://github.com/apache/incubator-grails-gradle-publish/pull/6#discussion_r2254425263


##########
.github/workflows/release.yaml:
##########
@@ -76,99 +72,77 @@ jobs:
       - name: "📝 Store the current release version"
         id: release_version
         run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
-      - name: '⚙️ Run pre-release'
+      - name: "⚙️ Run pre-release"
         uses: apache/grails-github-actions/pre-release@asf
         env:
           RELEASE_VERSION: ${{ steps.release_version.outputs.value }}
-          RELEASE_SCRIPT_PATH: '.github/scripts/setReleasedGrailsVersion.sh'
-      - name: 'Fetch release Commit Hash'
+      - name: "📝 Fetch release commit hash"
         id: commit_hash
         env:
           OWNER: ${{ github.repository_owner }}
           REPO: ${{ steps.extract_repository_name.outputs.repository_name }}
           TAG: 'v${{ steps.release_version.outputs.value }}'
         run: |
           ref_json=$(gh api "repos/$OWNER/$REPO/git/ref/tags/$TAG")
-
           type=$(jq -r '.object.type' <<<"$ref_json")
           sha=$(jq -r '.object.sha'  <<<"$ref_json")
-
           if [ "$type" = "tag" ]; then
             sha=$(gh api "repos/$OWNER/$REPO/git/tags/$sha" --jq '.object.sha')
           fi
-          
           echo "Found Commit Sha: $sha"
-
           echo "value=$sha" >>"$GITHUB_OUTPUT"
       - name: "🧩 Run Assemble"
-        run: ./gradlew assemble -PgithubBranch=${{ 
steps.extract_branch.outputs.value }}
-        env:
-          GRAILS_PUBLISH_RELEASE: "true"
+        run: >
+          ./gradlew assemble
+          -PgithubBranch=${{ steps.extract_branch.outputs.value }}
       - name: "📦 Generate docs"
-        run: ./gradlew grails-publish:groovydoc -PgithubBranch=${{ 
steps.extract_branch.outputs.value }}
-        env:
-          GRAILS_PUBLISH_RELEASE: "true"
-      - name: "Create Staging Repository"
+        run: >
+          ./gradlew grails-publish:groovydoc
+          -PgithubBranch=${{ steps.extract_branch.outputs.value }}
+      - name: "✨ Create Staging Repository"
         env:
-          GRAILS_PUBLISH_RELEASE: "true"
           NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
           NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
           NEXUS_PUBLISH_URL: 'https://repository.apache.org/service/local/'
           NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.STAGING_PROFILE_ID }}
           NEXUS_PUBLISH_DESCRIPTION: '${{ 
steps.extract_repository_name.outputs.repository_name }}:${{ 
steps.release_version.outputs.value }}'
           SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
-        run: >
-          ./gradlew initializeSonatypeStagingRepository
+        run: ./gradlew initializeSonatypeStagingRepository
       - name: "📤 Publish"
         env:
-          GRAILS_PUBLISH_RELEASE: 'true'
           NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}

Review Comment:
   I put the `GRAILS_PUBLISH_RELEASE` environment variable at the workflow 
level above instead, to not have to repeat it everywhere.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to