matrei commented on code in PR #15206:
URL: https://github.com/apache/grails-core/pull/15206#discussion_r2491818779


##########
.github/workflows/release.yml:
##########
@@ -294,77 +247,86 @@ jobs:
           rm -f grails/grails-forge/gradle/wrapper/gradle-wrapper.properties
           rm -f grails/grails-forge/gradlew
           rm -f grails/KEYS
-      - name: "Download CHECKSUMS.txt and rename to CHECKSUMS"
-        working-directory: "grails"
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: "📥 Download CHECKSUMS.txt and rename to CHECKSUMS"
+        working-directory: grails
         run: |
-          release_url=$(gh release view v${{ 
needs.publish.outputs.release_version }} --json assets --repo ${{ 
github.repository }} --jq '.assets[] | select(.name == "CHECKSUMS.txt") | .url')
-          curl -f -L -H "Authorization: token $GH_TOKEN" -o CHECKSUMS 
"$release_url"
-      - name: "Download PUBLISHED_ARTIFACTS.txt and rename to 
PUBLISHED_ARTIFACTS"
-        working-directory: "grails"
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          release_url=$(gh release view "${TAG}" --json assets --repo 
"${REPO_SLUG}" --jq '.assets[] | select(.name == "CHECKSUMS.txt") | .url')
+          curl -f -L -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o 
CHECKSUMS "$release_url"
+      - name: "📥 Download PUBLISHED_ARTIFACTS.txt and rename to 
PUBLISHED_ARTIFACTS"
+        working-directory: grails
         run: |
-          release_url=$(gh release view v${{ 
needs.publish.outputs.release_version }} --json assets --repo ${{ 
github.repository }} --jq '.assets[] | select(.name == 
"PUBLISHED_ARTIFACTS.txt") | .url')
-          curl -f -L -H "Authorization: token $GH_TOKEN" -o 
PUBLISHED_ARTIFACTS "$release_url"
-      - name: "Download BUILD_DATE.txt and rename to BUILD_DATE"
-        working-directory: "grails"
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          release_url=$(gh release view "${TAG}" --json assets --repo 
"${REPO_SLUG}" --jq '.assets[] | select(.name == "PUBLISHED_ARTIFACTS.txt") | 
.url')
+          curl -f -L -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o 
PUBLISHED_ARTIFACTS "$release_url"
+      - name: "📥 Download BUILD_DATE.txt and rename to BUILD_DATE"
+        working-directory: grails
         run: |
-          release_url=$(gh release view v${{ 
needs.publish.outputs.release_version }} --json assets --repo ${{ 
github.repository }} --jq '.assets[] | select(.name == "BUILD_DATE.txt") | 
.url')
-          curl -f -L -H "Authorization: token $GH_TOKEN" -o BUILD_DATE 
"$release_url"
-      - name: "Ensure source files use common date"
+          release_url=$(gh release view "${TAG}" --json assets --repo 
"${REPO_SLUG}" --jq '.assets[] | select(.name == "BUILD_DATE.txt") | .url')
+          curl -f -L -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o 
BUILD_DATE "$release_url"
+      - name: "📅 Ensure source files use common date"
         run: |
           SOURCE_DATE_EPOCH=$(cat grails/BUILD_DATE)
           find . -depth \( -type f -o -type d \) -exec touch -d 
"@${SOURCE_DATE_EPOCH}" {} +
       - name: "📦 Create source distribution ZIP"
-        run: |
-          zip -r "apache-grails-${{ needs.publish.outputs.release_version 
}}-src.zip" grails -x 'grails/.git/*' -x 'grails/.github/*'
+        run: >
+          zip -r
+          apache-grails-${VERSION}-src.zip
+          grails
+          -x 'grails/.git/*'
+          -x 'grails/.github/*'
       - name: '🔐 Set up GPG'
         run: |
           echo "${{ secrets.GRAILS_GPG_KEY }}" | gpg --batch --import
           gpg --list-keys
-        env:
-          GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
       - name: "🔏 Sign source distribution ZIP"
-        env:
-          GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
-        run: |
-          gpg --default-key "${GPG_KEY_ID}" --batch --yes --pinentry-mode 
loopback --armor --detach-sign apache-grails-${{ 
needs.publish.outputs.release_version }}-src.zip
+        run: >
+          gpg
+          --default-key "${{ secrets.GPG_KEY_ID }}"
+          --batch
+          --yes
+          --pinentry-mode loopback
+          --armor
+          --detach-sign
+          apache-grails-${VERSION}-src.zip
       - name: "📦 Create source distribution checksum"
-        run: |
-          sha512sum apache-grails-${{ needs.publish.outputs.release_version 
}}-src.zip > "apache-grails-${{ needs.publish.outputs.release_version 
}}-src.zip.sha512"
+        run: sha512sum apache-grails-${VERSION}-src.zip > 
apache-grails-${VERSION}-src.zip.sha512
       - name: "🚀 Upload ZIP and Signature to GitHub Release"
         uses: softprops/action-gh-release@v2
         with:
-          tag_name: ${{ github.event.release.tag_name }}
+          tag_name: ${{ env.TAG }}
           files: |
-            apache-grails-*-src.zip
-            apache-grails-*-src.zip.sha512
-            apache-grails-*-src.zip.asc
-      - name: "Remove CHECKSUMS.txt asset from release"
-        working-directory: "grails"
+            apache-grails-${{ env.VERSION }}-src.zip

Review Comment:
   I did that in the other repositories using `REPO_NAME` which suited them.
   Then I saw that it doesn't match here, so I thought we would make another 
iteration for that, but I wanted to discuss first.



-- 
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