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

jdaugherty pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit ff45df940ae961cb302dd8ba981ca71766b89467
Author: James Daugherty <[email protected]>
AuthorDate: Sun Jun 1 02:47:15 2025 -0400

    [skip ci] temporarily allow setting the tag separate from workflow branch 
run
---
 .github/workflows/release-source-distribution.yml | 29 +++++++++++++----------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/release-source-distribution.yml 
b/.github/workflows/release-source-distribution.yml
index a0c3cf45a2..ee6d5b50bc 100644
--- a/.github/workflows/release-source-distribution.yml
+++ b/.github/workflows/release-source-distribution.yml
@@ -16,6 +16,11 @@
 name: "Release - Source Distribution"
 on:
   workflow_dispatch:
+    inputs:
+      release_tag:
+        description: 'Release tag (e.g., v7.0.0-M4)'
+        required: true
+        type: string
 jobs:
   source:
     runs-on: ubuntu-latest
@@ -24,13 +29,13 @@ jobs:
         uses: actions/checkout@v4
         with:
           repository: apache/grails-core
-          ref: ${{ github.ref_name }}
+          ref: ${{ github.event.inputs.release_tag }}
           path: grails
       - name: "📥 Checkout grails-forge repository"
         uses: actions/checkout@v4
         with:
           repository: apache/grails-forge
-          ref: ${{ github.ref_name }}
+          ref: ${{ github.event.inputs.release_tag }}
           path: grails/grails-forge
       - name: "🗑️ Remove unnecessary files"
         run: |
@@ -49,21 +54,21 @@ jobs:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           cd grails
-          release_url=$(gh release view ${{ github.ref_name }} --json assets 
--repo apache/grails-core --jq '.assets[] | select(.name == "CHECKSUMS.txt") | 
.url')
+          release_url=$(gh release view ${{ github.event.inputs.release_tag }} 
--json assets --repo apache/grails-core --jq '.assets[] | select(.name == 
"CHECKSUMS.txt") | .url')
           curl -L -H "Authorization: token $GH_TOKEN" -o CHECKSUMS 
"$release_url"
       - name: "Download PUBLISHED_ARTIFACTS.txt and rename to 
PUBLISHED_ARTIFACTS"
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           cd grails
-          release_url=$(gh release view ${{ github.ref_name }} --json assets 
--repo apache/grails-core --jq '.assets[] | select(.name == 
"PUBLISHED_ARTIFACTS.txt") | .url')
+          release_url=$(gh release view ${{ github.event.inputs.release_tag }} 
--json assets --repo apache/grails-core --jq '.assets[] | select(.name == 
"PUBLISHED_ARTIFACTS.txt") | .url')
           curl -L -H "Authorization: token $GH_TOKEN" -o PUBLISHED_ARTIFACTS 
"$release_url"
       - name: "Download BUILD_DATE.txt and rename to BUILD_DATE"
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           cd grails
-          release_url=$(gh release view ${{ github.ref_name }} --json assets 
--repo apache/grails-core --jq '.assets[] | select(.name == "BUILD_DATE.txt") | 
.url')
+          release_url=$(gh release view ${{ github.event.inputs.release_tag }} 
--json assets --repo apache/grails-core --jq '.assets[] | select(.name == 
"BUILD_DATE.txt") | .url')
           curl -L -H "Authorization: token $GH_TOKEN" -o BUILD_DATE 
"$release_url"
       - name: "Ensure source files use common date"
         run: |
@@ -71,7 +76,7 @@ jobs:
           find . -type f -exec touch -d "@${SOURCE_DATE_EPOCH}" {} +
       - name: "📦 Create source distribution ZIP"
         run: |
-          version="${{ github.ref_name }}"
+          version="${{ github.event.inputs.release_tag }}"
           version="${version#v}"  # Strip 'v' prefix
           zip -r "apache-grails-${version}-incubating-src.zip" grails -x 
'grails/.git/*' -x 'grails/.github/*'
       - name: '🔐 Set up GPG'
@@ -84,18 +89,18 @@ jobs:
         env:
           GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
         run: |
-          version="${{ github.ref_name }}"
+          version="${{ github.event.inputs.release_tag }}"
           version="${version#v}"  # Strip 'v' prefix
           gpg --default-key "${GPG_KEY_ID}" --batch --yes --pinentry-mode 
loopback --armor --detach-sign apache-grails-${version}-incubating-src.zip
       - name: "📦 Create source distribution checksum"
         run: |
-          version="${{ github.ref_name }}"
+          version="${{ github.event.inputs.release_tag }}"
           version="${version#v}"  # Strip 'v' prefix
           sha512sum apache-grails-${version}-incubating-src.zip > 
"apache-grails-${version}-incubating-src.zip.sha512"
       - name: "🚀 Upload ZIP and Signature to GitHub Release"
         uses: softprops/action-gh-release@v2
         with:
-          tag_name: ${{ github.ref_name }}
+          tag_name: ${{ github.event.inputs.release_tag }}
           files: |
             apache-grails-*-incubating-src.zip
             apache-grails-*-incubating-src.zip.sha512
@@ -105,7 +110,7 @@ jobs:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           cd grails
-          asset_id=$(gh release view ${{ github.ref_name }} --json assets 
--repo apache/grails-core --jq '.assets[] | select(.name == "CHECKSUMS.txt") | 
.id')
+          asset_id=$(gh release view ${{ github.event.inputs.release_tag }} 
--json assets --repo apache/grails-core --jq '.assets[] | select(.name == 
"CHECKSUMS.txt") | .id')
           curl -X DELETE \
             -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
             https://api.github.com/repos/${{ github.repository 
}}/releases/assets/$asset_id
@@ -114,7 +119,7 @@ jobs:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           cd grails
-          asset_id=$(gh release view ${{ github.ref_name }} --json assets 
--repo apache/grails-core --jq '.assets[] | select(.name == "BUILD_DATE.txt") | 
.id')
+          asset_id=$(gh release view ${{ github.event.inputs.release_tag }} 
--json assets --repo apache/grails-core --jq '.assets[] | select(.name == 
"BUILD_DATE.txt") | .id')
           curl -X DELETE \
             -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
             https://api.github.com/repos/${{ github.repository 
}}/releases/assets/$asset_id
@@ -123,7 +128,7 @@ jobs:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           cd grails
-          asset_id=$(gh release view ${{ github.ref_name }} --json assets 
--repo apache/grails-core --jq '.assets[] | select(.name == 
"PUBLISHED_ARTIFACTS.txt") | .id')
+          asset_id=$(gh release view ${{ github.event.inputs.release_tag }} 
--json assets --repo apache/grails-core --jq '.assets[] | select(.name == 
"PUBLISHED_ARTIFACTS.txt") | .id')
           curl -X DELETE \
             -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
             https://api.github.com/repos/${{ github.repository 
}}/releases/assets/$asset_id

Reply via email to