This is an automated email from the ASF dual-hosted git repository.
matrei pushed a commit to branch 4.0.x
in repository https://gitbox.apache.org/repos/asf/grails-quartz.git
The following commit(s) were added to refs/heads/4.0.x by this push:
new b175c09 [skip ci] update release workflow
b175c09 is described below
commit b175c097c981e2c5784fff4fdd45436ac5f243ba
Author: Mattias Reichel <[email protected]>
AuthorDate: Thu Oct 16 13:33:13 2025 +0200
[skip ci] update release workflow
---
.github/scripts/releaseDistributions.sh | 19 +-
.github/scripts/releaseJarFiles.sh | 7 +-
.github/vote_templates/announce.txt | 10 +-
.github/vote_templates/staged.txt | 16 +-
.github/vote_templates/vote_succeded.txt | 12 +
.github/workflows/release.yml | 372 ++++++++++++++++---------------
6 files changed, 236 insertions(+), 200 deletions(-)
diff --git a/.github/scripts/releaseDistributions.sh
b/.github/scripts/releaseDistributions.sh
index 8c96994..b0fc7fe 100755
--- a/.github/scripts/releaseDistributions.sh
+++ b/.github/scripts/releaseDistributions.sh
@@ -19,26 +19,33 @@
# under the License.
#
-# ./releaseDistributions.sh <tag> <username> <password>
+# ./releaseDistributions.sh <tag> <username> <svn_folder>
set -euo pipefail
if [[ $# -ne 3 ]]; then
- echo "Usage: $0 <tag> <username> <password>" >&2
+ echo "Usage: $0 <tag> <svn_folder> <username>" >&2
exit 1
fi
RELEASE_TAG="$1"
RELEASE_VERSION="${RELEASE_TAG#v}"
-SVN_USER="$2"
-SVN_PASS="$3"
-RELEASE_ROOT="https://dist.apache.org/repos/dist/release/grails/quartz"
-DEV_ROOT="https://dist.apache.org/repos/dist/dev/grails/quartz"
+SVN_FOLDER="$2"
+SVN_USER="$3"
+RELEASE_ROOT="https://dist.apache.org/repos/dist/release/grails/${SVN_FOLDER}"
+DEV_ROOT="https://dist.apache.org/repos/dist/dev/grails/${SVN_FOLDER}"
+
+read -r -s -p "Password: " SVN_PASS
+echo
if [[ -z "${RELEASE_TAG}" ]]; then
echo "❌ ERROR: Release Tag must not be empty." >&2
exit 1
fi
+if [[ -z "${SVN_FOLDER}" ]]; then
+ echo "❌ ERROR: SVN folder name must not be empty." >&2
+ exit 1
+fi
if [[ -z "${SVN_USER}" ]]; then
echo "❌ ERROR: Username must not be empty." >&2
exit 1
diff --git a/.github/scripts/releaseJarFiles.sh
b/.github/scripts/releaseJarFiles.sh
index 8421782..b0a4874 100755
--- a/.github/scripts/releaseJarFiles.sh
+++ b/.github/scripts/releaseJarFiles.sh
@@ -23,15 +23,16 @@
set -euo pipefail
-if [[ $# -ne 3 ]]; then
- echo "Usage: $0 <staging repo description> <username> <password>" >&2
+if [[ $# -ne 2 ]]; then
+ echo "Usage: $0 <staging repo description> <username>" >&2
exit 1
fi
NEXUS_URL="https://repository.apache.org"
STAGING_DESCRIPTION="$1"
NEXUS_USER="$2"
-NEXUS_PASS="$3"
+read -r -s -p "Password: " NEXUS_PASS
+echo
if [[ -z "${STAGING_DESCRIPTION}" ]]; then
echo "ERROR: Staging Description must not be empty." >&2
diff --git a/.github/vote_templates/announce.txt
b/.github/vote_templates/announce.txt
index 7615ab7..39072c1 100644
--- a/.github/vote_templates/announce.txt
+++ b/.github/vote_templates/announce.txt
@@ -1,19 +1,19 @@
-The Apache Grails community is pleased to announce the release of Apache
Grails Quartz Plugin ${VERSION}.
+The Apache Grails community is pleased to announce the release of
${PROJECT_NAME} ${VERSION}.
Grails is a powerful Apache Groovy-based web application framework for the JVM
built on top of Spring Boot that has many plugins to further extend its
functionality.
-This Grails Quartz Plugin release is another milestone on our journey to a
final 7.0 release. Users are encouraged to try the milestone to provide early
feedback. More information can be found here:
https://apache.github.io/grails-quartz/${VERSION}/guide
+More information can be found here:
https://apache.github.io/${REPO_SLUG}/${VERSION}/guide
The release notes are available here:
-https://github.com/apache/grails-quartz/releases/tag/v${VERSION}
+https://github.com/apache/${REPO_SLUG}/releases/tag/${TAG}
Apache Grails website: https://grails.apache.org/
Download Links: https://grails.apache.org/download.html
Grails Resources:
-- Grails Quartz GitHub repo: https://github.com/apache/grails-quartz
-- Issues: https://github.com/apache/grails-quartz/issues
+- ${PROJECT_NAME} GitHub repo: https://github.com/apache/${REPO_SLUG}
+- Issues: https://github.com/apache/${REPO_SLUG}/issues
- Mailing lists: https://grails.apache.org/community.html
Happy Coding,
diff --git a/.github/vote_templates/staged.txt
b/.github/vote_templates/staged.txt
index 695c388..ca37a8e 100644
--- a/.github/vote_templates/staged.txt
+++ b/.github/vote_templates/staged.txt
@@ -1,21 +1,21 @@
Hi Everyone,
-I am happy to start the VOTE thread for an Apache Grails Quartz Plugin release
of version ${VERSION}!
+I am happy to start the VOTE thread for an ${PROJECT_NAME} release of version
${VERSION}!
Release notes for the release are here:
-https://github.com/apache/grails-quartz/releases/tag/v${VERSION}
+https://github.com/${REPO_SLUG}/releases/tag/${TAG}
The tag for this release is:
-https://github.com/apache/grails-quartz/releases/tag/v${VERSION}
-Tag commit id: ${VERSION_COMMIT_ID}
+https://github.com/${REPO_SLUG}/releases/tag/${TAG}
+Tag commit id: ${SHA}
The artifacts to be voted on are located as follows (r${DIST_SVN_REVISION}):
-Source release:
https://dist.apache.org/repos/dist/dev/grails/quartz/${VERSION}/sources
+Source release:
https://dist.apache.org/repos/dist/dev/grails/${SVN_FOLDER}/${VERSION}/sources
Release artifacts are signed with a key from the following file:
https://dist.apache.org/repos/dist/release/grails/KEYS
-Please vote on releasing this package as: Apache Grails Quartz Plugin
${VERSION}.
+Please vote on releasing this package as: ${PROJECT_NAME} ${VERSION}.
Reminder on ASF release approval requirements for PMC members:
https://www.apache.org/legal/release-policy.html#release-approval
@@ -26,9 +26,9 @@ https://www.apache.org/info/verification.html
The vote is open for a minimum of 72 hours and passes if a majority of at least
three +1 PMC votes are cast.
-[ ] +1 Release Apache Grails Quartz Plugin ${VERSION}
+[ ] +1 Release ${PROJECT_NAME} ${VERSION}
[ ] 0 I don't have a strong opinion about this, but I assume it's ok
-[ ] -1 Do not release Apache Grails Quartz Plugin ${VERSION} because...
+[ ] -1 Do not release ${PROJECT_NAME} ${VERSION} because...
Here is my vote:
diff --git a/.github/vote_templates/vote_succeded.txt
b/.github/vote_templates/vote_succeded.txt
new file mode 100644
index 0000000..4cf55c9
--- /dev/null
+++ b/.github/vote_templates/vote_succeded.txt
@@ -0,0 +1,12 @@
+The vote has passed with <X> +1 binding votes and <Y> +1 additional votes.
+
+<IF NEW EMAIL>
+Vote thread: <VOTE THREAD PERMALINK>
+</IF NEW EMAIL>
+
+I'll proceed with the release and announce it shortly.
+
+Thanks to everyone who participated in the vote!
+
+Regards
+<NAME>
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 268af47..49a85f9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,46 +17,37 @@ name: "Release"
on:
release:
types: [published]
-permissions:
- contents: write
- packages: read
+permissions: {}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GRAILS_PUBLISH_RELEASE: true
+ JAVA_VERSION: 17.0.15 # this must be a specific version for reproducible
builds, keep it synced with .sdkmanrc
+ PROJECT_NAME: Apache Grails Quartz Plugin
+ REPO_NAME: ${{ github.event.repository.name }}
+ REPO_SLUG: ${{ github.repository }}
+ SVN_FOLDER: quartz
+ TAG: ${{ github.event.release.tag_name }}
+ VERSION: will be computed in each job
jobs:
publish:
name: "Stage Jar Files"
permissions:
- packages: read # pre-release workflow
- contents: write # to create release
- issues: write # to modify milestones
+ contents: write # to stage distributions to the GitHub release page
+ issues: write # to modify milestones
runs-on: ubuntu-24.04
- outputs:
- release_version: ${{ steps.release_version.outputs.value }}
- commit_hash: ${{ steps.commit_hash.outputs.value }}
- extract_repository_name: ${{
steps.extract_repository_name.outputs.repository_name }}
steps:
- - name: "📝 Store the current release version"
- id: release_version
- run: |
- export RELEASE_VERSION="${GITHUB_REF:11}"
- echo "Found Release Version: ${RELEASE_VERSION}"
- echo "value=${RELEASE_VERSION}" >> $GITHUB_OUTPUT
- - name: "Output Agent IP" # in the event RAO blocks this agent, this can
be used to debug it
+ - name: "🌐 Output Agent IP" # in the event RAO blocks this agent, this
can be used to debug it
run: curl -s https://api.ipify.org
- - name: "Extract repository name"
- id: extract_repository_name
- run: |
- echo "repository_name=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
+ - name: "📝 Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: "📥 Checkout repository"
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
- token: ${{ secrets.GITHUB_TOKEN }}
- ref: v${{ steps.release_version.outputs.value }}
- - name: 'Ensure Common Build Date' # to ensure a reproducible build
+ token: ${{ secrets.GITHUB_TOKEN }} # This should not be needed as
${{ github.token }} is the default, but there have been issues with it.
+ - name: "📅 Store common build date" # to ensure a reproducible build
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >>
"$GITHUB_ENV"
- - name: "Ensure source files use common date"
- run: |
- find . -depth \( -type f -o -type d \) -exec touch -d
"@${SOURCE_DATE_EPOCH}" {} +
+ - name: "📅 Ensure source files use common date"
+ run: find . -depth \( -type f -o -type d \) -exec touch -d
"@${SOURCE_DATE_EPOCH}" {} +
- name: '🔐 Set up GPG'
run: |
echo "${{ secrets.GRAILS_GPG_KEY }}" | gpg --batch --import
@@ -64,73 +55,63 @@ jobs:
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
- name: "☕️ Setup JDK"
- uses: actions/setup-java@v4
+ uses: actions/setup-java@v5
with:
distribution: liberica
- java-version: '17.0.15' # this must be a specific version for
reproducible builds
+ java-version: ${{ env.JAVA_VERSION }}
- name: "🐘 Setup Gradle"
- uses: gradle/actions/setup-gradle@v4
+ uses: gradle/actions/setup-gradle@v5
with:
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "⚙️ Run pre-release"
uses: apache/grails-github-actions/pre-release@asf
env:
- RELEASE_VERSION: ${{ steps.release_version.outputs.value }}
- - name: 'Fetch release Commit Hash'
- id: commit_hash
+ RELEASE_VERSION: ${{ env.VERSION }}
+ - name: "✨ Create Staging Repository"
env:
- OWNER: ${{ github.repository_owner }}
- REPO: ${{ steps.extract_repository_name.outputs.repository_name }}
- TAG: 'v${{ steps.release_version.outputs.value }}'
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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: "📤 Publish to staging repository"
+ NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
+ NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
+ NEXUS_PUBLISH_URL: ${{ vars.STAGING_URL }}
+ NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.STAGING_PROFILE_ID }}
+ NEXUS_PUBLISH_DESCRIPTION: '${{ env.REPO_NAME }}:${{ VERSION }}'
+ SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
+ run: ./gradlew initializeSonatypeStagingRepository
+ - name: "📤 Publish to 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_URL: ${{ vars.STAGING_URL }}
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.STAGING_PROFILE_ID }}
- NEXUS_PUBLISH_DESCRIPTION: '${{
steps.extract_repository_name.outputs.repository_name }}:${{
steps.release_version.outputs.value }}'
+ NEXUS_PUBLISH_DESCRIPTION: '${{ env.REPO_NAME }}:${{ VERSION }}'
SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
run: >
- ./gradlew
- publishToSonatype
- closeSonatypeStagingRepository
+ ./gradlew findSonatypeStagingRepository
+ publishToSonatype
aggregateChecksums
aggregatePublishedArtifacts
- - name: "Upload checksums"
- uses:
softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
- with:
- files: build/CHECKSUMS.txt
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: "Upload published artifacts"
- uses:
softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
- with:
- files: build/PUBLISHED_ARTIFACTS.txt
+ -x initializeSonatypeStagingRepository
+ - name: "✅ Close Staging Repository"
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: "Generate Build Date file"
+ NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
+ NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
+ NEXUS_PUBLISH_URL: ${{ vars.STAGING_URL }}
+ NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.STAGING_PROFILE_ID }}
+ NEXUS_PUBLISH_DESCRIPTION: '${{ env_REPO_NAME }}:${{ VERSION }}'
+ SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
+ run: >
+ ./gradlew findSonatypeStagingRepository
+ closeSonatypeStagingRepository
+ -x initializeSonatypeStagingRepository
+ - name: "📅 Generate build date file"
run: echo "$SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt
- - name: "Upload Build Date file"
- uses:
softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
+ - name: "📤 Upload build date, checksums and published artifacts files"
+ uses: softprops/action-gh-release@v2
with:
- files: build/BUILD_DATE.txt
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ tag_name: ${{ env.TAG }}
+ files: |
+ build/BUILD_DATE.txt
+ build/CHECKSUMS.txt
+ build/PUBLISHED_ARTIFACTS.txt
source:
# to ensure we never publish any build artifacts, run the source
distribution as a separate build workflow
name: "Create Source Distribution"
@@ -139,47 +120,53 @@ jobs:
contents: write
runs-on: ubuntu-24.04
steps:
+ - name: "📝 Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: "📥 Checkout repository"
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
- token: ${{ secrets.GITHUB_TOKEN }}
- ref: v${{ needs.publish.outputs.release_version }}
- path: ${{ needs.publish.outputs.extract_repository_name }}
+ token: ${{ secrets.GITHUB_TOKEN }} # This should not be needed as
${{ github.token }} is the default, but there have been issues with it.
+ path: ${{ env.REPO_NAME }}
- name: "🗑️ Remove unnecessary files"
+ working-directory: ${{ env.REPO_NAME }}
run: |
- rm -f ${{ needs.publish.outputs.extract_repository_name
}}/gradle/wrapper/gradle-wrapper.jar
- rm -f ${{ needs.publish.outputs.extract_repository_name
}}/gradle/wrapper/gradle-wrapper.properties
- rm -f ${{ needs.publish.outputs.extract_repository_name }}/gradlew
- rm -f ${{ needs.publish.outputs.extract_repository_name
}}/gradlew.bat
- rm -f ${{ needs.publish.outputs.extract_repository_name }}/.asf.yaml
+ rm -f gradle/wrapper/gradle-wrapper.jar
+ rm -f gradle/wrapper/gradle-wrapper.properties
+ rm -f gradlew
+ rm -f gradlew.bat
+ rm -f .asf.yaml
- name: "📥 Download CHECKSUMS.txt and rename to CHECKSUMS"
- working-directory: '${{ needs.publish.outputs.extract_repository_name
}}'
+ working-directory: ${{ env.REPO_NAME }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- release_url=$(gh release view v${{
needs.publish.outputs.release_version }} --json assets --repo ${{
github.repository }} --jq '.assets[] | select(.name == "CHECKSUMS.txt") | .url')
+ release_url=$(gh release view "$TAG" --json assets --repo
"$REPO_SLUG" --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: '${{ needs.publish.outputs.extract_repository_name
}}'
+ working-directory: ${{ env.REPO_NAME }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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')
+ 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 $GH_TOKEN" -o
PUBLISHED_ARTIFACTS "$release_url"
- name: "📥 Download BUILD_DATE.txt and rename to BUILD_DATE"
- working-directory: '${{ needs.publish.outputs.extract_repository_name
}}'
+ working-directory: ${{ env.REPO_NAME }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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')
+ 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 $GH_TOKEN" -o BUILD_DATE
"$release_url"
- name: "📅 Ensure source files use common date"
run: |
- SOURCE_DATE_EPOCH=$(cat ${{
needs.publish.outputs.extract_repository_name }}/BUILD_DATE)
+ SOURCE_DATE_EPOCH=$(cat ${REPO_NAME}/BUILD_DATE)
find . -depth \( -type f -o -type d \) -exec touch -d
"@${SOURCE_DATE_EPOCH}" {} +
- name: "📦 Create source distribution ZIP"
run: |
- zip -r "apache-${{ needs.publish.outputs.extract_repository_name
}}-${{ needs.publish.outputs.release_version }}-src.zip" ${{
needs.publish.outputs.extract_repository_name }} -x '${{
needs.publish.outputs.extract_repository_name }}/.git/*' -x '${{
needs.publish.outputs.extract_repository_name }}/.github/*'
+ zip -r \
+ "apache-${REPO_NAME}-${VERSION}-src.zip" \
+ "$REPO_NAME" \
+ -x "${REPO_NAME}/.git/*" \
+ -x "${REPO_NAME}/.github/*"
- name: '🔐 Set up GPG'
run: |
echo "${{ secrets.GRAILS_GPG_KEY }}" | gpg --batch --import
@@ -190,51 +177,55 @@ jobs:
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
run: |
- gpg --default-key "${GPG_KEY_ID}" --batch --yes --pinentry-mode
loopback --armor --detach-sign ./apache-${{
needs.publish.outputs.extract_repository_name }}-${{
needs.publish.outputs.release_version }}-src.zip
+ gpg \
+ --default-key "$GPG_KEY_ID" \
+ --batch \
+ --yes \
+ --pinentry-mode loopback \
+ --armor \
+ --detach-sign "apache-${REPO_NAME}-${VERSION}-src.zip"
- name: "📦 Create source distribution checksum"
run: |
- sha512sum ./apache-${{ needs.publish.outputs.extract_repository_name
}}-${{ needs.publish.outputs.release_version }}-src.zip > "apache-${{
needs.publish.outputs.extract_repository_name }}-${{
needs.publish.outputs.release_version }}-src.zip.sha512"
- cat ./apache-${{ needs.publish.outputs.extract_repository_name
}}-${{ needs.publish.outputs.release_version }}-src.zip.sha512
+ sha512sum "./apache-${REPO_NAME}-${VERSION}-src.zip" \
+ > "apache-${REPO_NAME}-${VERSION}-src.zip.sha512"
+ cat "./apache-${REPO_NAME}-${VERSION}-src.zip.sha512"
- name: "🚀 Upload ZIP and Signature to GitHub Release"
- uses:
softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
+ uses: softprops/action-gh-release@v2
with:
- tag_name: v${{ needs.publish.outputs.release_version }}
+ tag_name: ${{ env.TAG }}
files: |
- apache-${{ needs.publish.outputs.extract_repository_name }}-${{
needs.publish.outputs.release_version }}-src.zip
- apache-${{ needs.publish.outputs.extract_repository_name }}-${{
needs.publish.outputs.release_version }}-src.zip.sha512
- apache-${{ needs.publish.outputs.extract_repository_name }}-${{
needs.publish.outputs.release_version }}-src.zip.asc
+ apache-${{ env.REPO_NAME }}-${{ env.VERSION }}-src.zip
+ apache-${{ env.REPO_NAME }}-${{ env.VERSION }}-src.zip.sha512
+ apache-${{ env.REPO_NAME }}-${{ env.VERSION }}-src.zip.asc
- name: "🗑️ Remove CHECKSUMS.txt asset from release"
- working-directory: '${{ needs.publish.outputs.extract_repository_name
}}'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
gh release delete-asset \
- v${{ needs.publish.outputs.release_version }} \
+ "$TAG" \
CHECKSUMS.txt \
- --repo ${{ github.repository }} \
+ --repo "$REPO_SLUG" \
--yes
- name: "🗑️ Remove BUILD_DATE.txt asset from release"
- working-directory: '${{ needs.publish.outputs.extract_repository_name
}}'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
gh release delete-asset \
- v${{ needs.publish.outputs.release_version }} \
+ "$TAG" \
BUILD_DATE.txt \
- --repo ${{ github.repository }} \
+ --repo "$REPO_SLUG" \
--yes
- name: "🗑️ Remove PUBLISHED_ARTIFACTS.txt asset from release"
- working-directory: '${{ needs.publish.outputs.extract_repository_name
}}'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
gh release delete-asset \
- v${{ needs.publish.outputs.release_version }} \
+ "$TAG" \
PUBLISHED_ARTIFACTS.txt \
- --repo ${{ github.repository }} \
+ --repo "$REPO_SLUG" \
--yes
upload:
name: "Upload Source Distribution"
@@ -246,100 +237,98 @@ jobs:
SVN_USERNAME: ${{ secrets.SVC_DIST_GRAILS_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVC_DIST_GRAILS_PASSWORD }}
steps:
- - name: "🌐 Output Agent IP" # in the event RAO blocks this agent, this
can be used to debug it
- run: curl -s https://api.ipify.org
+ - name: "📝 Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: "⚙️ Setup SVN and Tools"
run: sudo apt-get install -y subversion subversion-tools tree
gettext-base
- name: "👀 Ensure grails dev folder exists"
run: |
set -e
-
if svn ls https://dist.apache.org/repos/dist/dev/grails --username
"$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive; then
- echo "Dev Folder 'grails' already exists — skipping creation"
+ echo "Dev Folder [grails] already exists — skipping creation"
else
- echo "Dev Folder 'grails' does not exist, creating"
+ echo "Dev Folder [grails] does not exist, creating"
svnmucc --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
--non-interactive \
mkdir https://dist.apache.org/repos/dist/dev/grails \
-m "Create 'grails' dev folder"
fi
- - name: "👀 Ensure grails quartz folder exists"
+ - name: "👀 Ensure grails ${{ env.SVN_FOLDER }} folder exists"
run: |
set -e
-
- if svn ls https://dist.apache.org/repos/dist/dev/grails/quartz
--username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive; then
- echo "Dev Folder 'grails/quartz' already exists — skipping
creation"
+ if svn ls
"https://dist.apache.org/repos/dist/dev/grails/${SVN_FOLDER}" --username
"$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive; then
+ echo "Dev Folder [grails/${SVN_FOLDER}] already exists — skipping
creation"
else
- echo "Dev Folder 'grails/quartz' does not exist, creating"
+ echo "Dev Folder [grails/${SVN_FOLDER}] does not exist, creating"
svnmucc --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
--non-interactive \
- mkdir https://dist.apache.org/repos/dist/dev/grails/quartz \
- -m "Create 'grails quartz' dev folder"
+ mkdir
"https://dist.apache.org/repos/dist/dev/grails/${SVN_FOLDER}" \
+ -m "Create 'grails ${SVN_FOLDER}' dev folder"
fi
- name: "📥 Checkout dev repo"
run: |
- svn checkout --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
--non-interactive https://dist.apache.org/repos/dist/dev/grails/quartz dev-repo
+ svn checkout --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
--non-interactive "https://dist.apache.org/repos/dist/dev/grails/${SVN_FOLDER}"
dev-repo
- name: "🗑️ Remove existing dev version"
run: |
- export VERSION="${{ needs.publish.outputs.release_version }}"
cd dev-repo
if [ -d "$VERSION" ]; then
svn delete "$VERSION"
- svn commit -m "Remove grails quartz dev version $VERSION"
--username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive
+ svn commit -m "Remove grails ${SVN_FOLDER} dev version ${VERSION}"
--username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive
else
- echo "No existing dev version $VERSION to remove"
+ echo "No existing dev version ${VERSION} to remove"
fi
- name: "📥 Fetch source distributions"
run: |
- export TAG="v${{ needs.publish.outputs.release_version }}"
- export VERSION="${{ needs.publish.outputs.release_version }}"
cd dev-repo
- mkdir -p $VERSION/sources
- cd $VERSION/sources
- curl -f -LO https://github.com/apache/${{
needs.publish.outputs.extract_repository_name
}}/releases/download/$TAG/apache-${{
needs.publish.outputs.extract_repository_name }}-$VERSION-src.zip
- curl -f -LO https://github.com/apache/${{
needs.publish.outputs.extract_repository_name
}}/releases/download/$TAG/apache-${{
needs.publish.outputs.extract_repository_name }}-$VERSION-src.zip.sha512
- curl -f -LO https://github.com/apache/${{
needs.publish.outputs.extract_repository_name
}}/releases/download/$TAG/apache-${{
needs.publish.outputs.extract_repository_name }}-$VERSION-src.zip.asc
+ mkdir -p "${VERSION}/sources"
+ cd "${VERSION}/sources"
+ curl -f -LO
"https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-${REPO_NAME}-${VERSION}-src.zip"
+ curl -f -LO
"https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-${REPO_NAME}-${VERSION}-src.zip.sha512"
+ curl -f -LO
"https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-${REPO_NAME}-${VERSION}-src.zip.asc"
echo "Downloaded the following files:"
ls -l
- - name: "Upload distributions"
+ - name: "🚀 Upload distributions"
run: |
- export TAG="v${{ needs.publish.outputs.release_version }}"
- export VERSION="${{ needs.publish.outputs.release_version }}"
cd dev-repo
echo "Adding the following files to SVN:"
tree
- svn add $VERSION --force
- svn commit -m "Upload grails distribution files for $VERSION"
--username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive
+ svn add "$VERSION" --force
+ svn commit -m "Upload ${PROJECT_NAME} distribution files for
${VERSION}" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
--non-interactive
pwd
- name: "💾 Store Distribution SVN revision in a file"
run: |
- export VERSION="${{ needs.publish.outputs.release_version }}"
cd dev-repo
- svn info $VERSION > "DIST_SVN_REVISION.txt"
+ svn info "$VERSION" > "DIST_SVN_REVISION.txt"
- name: "📤 Upload the Distribution SVN revision file"
uses: softprops/action-gh-release@v2
with:
+ tag_name: ${{ env.TAG }}
files: dev-repo/DIST_SVN_REVISION.txt
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "📥 Checkout repository"
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
- token: ${{ secrets.GITHUB_TOKEN }}
- ref: v${{ needs.publish.outputs.release_version }}
- path: ${{ needs.publish.outputs.extract_repository_name }}
- - name: "📧 Print Grails Vote Email"
+ path: ${{ env.REPO_NAME }}
+ - name: "📝 Fetch new sha for the release tag after pre-prelease commit"
env:
- VERSION: ${{ needs.publish.outputs.release_version }}
- VERSION_COMMIT_ID: ${{ needs.publish.outputs.commit_hash }}
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ ref_json=$(gh api "repos/${REPO_SLUG}/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/${REPO_SLUG}/git/tags/${sha}" --jq
'.object.sha')
+ fi
+ echo "Found sha: $sha"
+ echo "SHA=${sha}" >> "$GITHUB_ENV"
+ - name: "📧 Print Grails Vote Email"
run: |
export DIST_SVN_REVISION=$(awk '/Last Changed Rev:/ {print $4}'
dev-repo/DIST_SVN_REVISION.txt)
echo "::group::Grails PMC Vote Email"
echo "*************************************************"
- echo "Subject: [VOTE] Release Apache Grails Quartz Plugin ${VERSION}"
+ echo "Subject: [VOTE] Release ${PROJECT_NAME} ${VERSION}"
echo "*************************************************"
echo "Body:"
echo "*************************************************"
- cat ${{ needs.publish.outputs.extract_repository_name
}}/.github/vote_templates/staged.txt | envsubst
+ cat ${REPO_NAME}/.github/vote_templates/staged.txt | envsubst
echo "*************************************************"
echo "::endgroup::"
release:
@@ -348,30 +337,52 @@ jobs:
needs: [ publish, source, upload ]
runs-on: ubuntu-24.04
steps:
- - name: "Output Agent IP" # in the event RAO blocks this agent, this can
be used to debug it
- run: curl -s https://api.ipify.org
+ - name: "📝 Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
+ - uses: actions/checkout@v5
- name: "Setup SVN and Tools"
run: sudo apt-get install -y subversion subversion-tools tree
gettext-base
- - name: "🗳 Grails PMC Vote Confirmation - MANUAL"
+ - name: "🗳 MANUAL - Confirm Grails PMC Vote succeeded"
run: |
echo "::group::Manual Confirmation"
- echo "🔎 This step is a placeholder that the vote confirmation on
[email protected] completed successfully."
+ echo "🔎 Make sure that the vote confirmation on
[email protected] completed successfully before proceeding."
+ echo "::endgroup::"
+ - name: "✉️ MANUAL - Send Vote Result Email"
+ run: |
+ echo "::group::Manual Vote Result Email"
+ echo ""
+ echo "Send a new email or reply to the original vote email by
changing the subject."
+ echo ""
+ echo "TO:"
+ echo "*************************************************"
+ echo "[email protected]
+ echo "*************************************************"
+ echo ""
+ echo "Subject:"
+ echo "*************************************************"
+ echo "[RESULT][VOTE] ${PROJECT_NAME} ${VERSION}"
+ echo "*************************************************"
+ echo ""
+ echo "Body:"
+ echo "*************************************************"
+ cat .github/vote_templates/vote_succeeded.txt | envsubst
+ echo "*************************************************"
echo "::endgroup::"
- name: "🚀 Release JAR files - MANUAL"
run: |
echo "::group::Manual Jar Promotion"
- echo "Run .github/scripts/releaseJarFiles.sh 'v${{
needs.publish.outputs.release_version }}' '${{
needs.publish.outputs.extract_repository_name }}:${{
needs.publish.outputs.release_version }}' ASF_USER ASF_PASS"
+ echo "Run .github/scripts/releaseJarFiles.sh ${TAG}
${REPO_NAME}:${VERSION} <ASF_USER>"
echo "::endgroup::"
- name: "🚀 Release distribution artifacts - MANUAL"
run: |
echo "::group::Manual ASF Artifact Promotion"
- echo "Run github/scripts/releaseDistributions.sh 'v${{
needs.publish.outputs.release_version }}' ASF_USER ASF_PASS"
+ echo "Run .github/scripts/releaseDistributions.sh ${TAG}
${SVN_FOLDER} <ASF_USER>"
echo "::endgroup::"
- name: "✅ Update ASF Reporter - MANUAL"
run: |
echo "::group::Manual ASF Reporter Update"
TODAY=$(date +"%Y-%m-%d")
- echo "Check email & update https://reporter.apache.org to mark the
release ${{ needs.publish.outputs.release_version }} as complete as of ${TODAY}"
+ echo "Check email from [email protected] & update
https://reporter.apache.org/addrelease.html?grails to add
${SVN_FOLDER^^}:${VERSION} as complete as of ${TODAY}"
echo "::endgroup::"
docs:
environment: docs
@@ -382,31 +393,31 @@ jobs:
contents: write # required for gradle.properties revert
issues: write # required for milestone closing
steps:
+ - name: "📝 Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: "📥 Checkout repository"
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- ref: v${{ needs.publish.outputs.release_version }}
+ - 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
+ uses: actions/setup-java@v5
with:
- java-version: '17.0.15'
distribution: liberica
+ java-version: ${{ env.JAVA_VERSION }}
- name: "🐘 Setup Gradle"
- uses: gradle/actions/setup-gradle@v4
+ uses: gradle/actions/setup-gradle@v5
with:
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "🔨 Build Documentation"
run: ./gradlew docs
- env:
- GRAILS_PUBLISH_RELEASE: 'true'
- name: "🚀 Publish to Github Pages"
uses: apache/grails-github-actions/deploy-github-pages@asf
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GRADLE_PUBLISH_RELEASE: 'true'
SOURCE_FOLDER: build/docs
- VERSION: ${{ needs.publish.outputs.release_version }}
close:
name: "VOTE SUCCEEDED - Close Release"
environment: release
@@ -418,41 +429,46 @@ jobs:
pull-requests: write # to open PR
actions: write # in case there are pending changes to release.yml in the
target branch
steps:
+ - name: "📝 Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: "📥 Checkout repository"
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- ref: v${{ needs.publish.outputs.release_version }}
- name: "☕️ Setup JDK"
- uses: actions/setup-java@v4
+ uses: actions/setup-java@v5
with:
distribution: liberica
- java-version: '17.0.15'
+ java-version: ${{ env.JAVA_VERSION }}
- name: "🐘 Setup Gradle"
- uses: gradle/actions/setup-gradle@v4
+ uses: gradle/actions/setup-gradle@v5
with:
- develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
+ develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "⚙️ Run post-release"
uses: apache/grails-github-actions/post-release@asf
- name: '🌎 Create Blog Post - MANUAL'
run: |
echo "::group::Blog Post Creation - MANUAL"
- echo "Publish a blog post on https://grails.apache.org/blog/ about
the new release ${{ needs.publish.outputs.release_version }} using the repo
https://github.com/apache/grails-static-website"
+ echo "Publish a blog post on https://grails.apache.org/blog/ about
the new release [${VERSION}] using the repo
https://github.com/apache/grails-static-website"
echo "::endgroup::"
- name: 'Announcement Email'
env:
- VERSION: ${{ needs.publish.outputs.release_version }}
- VERSION_COMMIT_ID: ${{ needs.publish.outputs.commit_hash }}
PREVIOUS_VERSION: 'TODO_PREVIOUS_VERSION'
run: |
- export DIST_SVN_REVISION=$(awk '/Last Changed Rev:/ {print $4}'
dev-repo/DIST_SVN_REVISION.txt)
-
echo "::group::Announcement Email"
+ echo ""
+ echo "TO:"
+ echo "*************************************************"
+ echo "[email protected], [email protected],
[email protected]"
+ echo "*************************************************"
+ echo ""
+ echo "Subject:"
echo "*************************************************"
- echo "Subject: [ANNOUNCE] Apache Grails Quartz Plugin ${VERSION}"
+ echo "[ANNOUNCE] ${PROJECT_NAME} ${VERSION}"
echo "*************************************************"
+ echo ""
echo "Body:"
echo "*************************************************"
- cat ${{ needs.publish.outputs.extract_repository_name
}}/.github/vote_templates/announce.txt | envsubst
+ cat .github/vote_templates/announce.txt | envsubst
echo "*************************************************"
echo "::endgroup::"