You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ma...@apache.org on 2025/11/04 11:32:12 UTC
(grails-core) 01/01: [skip ci] post 7.0.1 release adjustments
This is an automated email from the ASF dual-hosted git repository.
matrei pushed a commit to branch post-7.0.1
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 82499249ac900edb969b10b2134e54d3ebf6a729
Author: Mattias Reichel <ma...@gmail.com>
AuthorDate: Tue Nov 4 12:30:40 2025 +0100
[skip ci] post 7.0.1 release adjustments
---
.github/scripts/releaseDistributions.sh | 15 +-
.github/scripts/releaseJarFiles.sh | 9 +-
.github/vote_templates/announce.txt | 14 +-
.github/vote_templates/staged.txt | 20 +-
.github/vote_templates/vote_succeeded.txt | 12 +
.github/workflows/release.yml | 640 +++++++++++++++---------------
.sdkmanrc | 2 +-
etc/bin/Dockerfile | 2 +-
etc/bin/verify.sh | 17 +-
9 files changed, 365 insertions(+), 366 deletions(-)
diff --git a/.github/scripts/releaseDistributions.sh b/.github/scripts/releaseDistributions.sh
index 77a435c0db..f89c0fc555 100755
--- a/.github/scripts/releaseDistributions.sh
+++ b/.github/scripts/releaseDistributions.sh
@@ -19,21 +19,24 @@
# under the License.
#
-# ./releaseDistributions.sh <tag> <username> <password>
+# ./releaseDistributions.sh <tag> <svn_folder> <username>
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/core"
-DEV_ROOT="https://dist.apache.org/repos/dist/dev/grails/core"
+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
diff --git a/.github/scripts/releaseJarFiles.sh b/.github/scripts/releaseJarFiles.sh
index 8421782d74..4e781e072f 100755
--- a/.github/scripts/releaseJarFiles.sh
+++ b/.github/scripts/releaseJarFiles.sh
@@ -19,19 +19,20 @@
# under the License.
#
-# ./releaseJarFiles.sh <staging repo description> <username> <password>
+# ./releaseJarFiles.sh <staging repo description> <username>
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 f909d6143e..f36e72a523 100644
--- a/.github/vote_templates/announce.txt
+++ b/.github/vote_templates/announce.txt
@@ -1,22 +1,20 @@
-The Apache Grails community is pleased to announce the release of Apache Grails ${VERSION}.
+The Apache Grails community is pleased to announce the release of ${PROJECT_NAME} ${VERSION}.
-Grails is a powerful Groovy-based web application framework for the JVM built on top of Spring Boot that has many plugins to further extend its functionality.
-
-This release another milestone on our journey to a final 7.0 release. Users are encouraged to try the milestone to provide early feedback. Detailed upgrade instructions are available here: https://grails.apache.org/docs/${VERSION}/guide/upgrading.html
+${PROJECT_DESC}
The release notes are available here:
-<blog post link>
+https://github.com/${REPO_SLUG}/releases/tag/${TAG}
For the complete list of changes:
-https://github.com/apache/grails-core/compare/v${PREVIOUS_VERSION}...v${VERSION}
+https://github.com/${REPO_SLUG}/compare/v<PREVIOUS_VERSION>...${TAG}
Apache Grails website: https://grails.apache.org/
Download Links: https://grails.apache.org/download.html
Grails Resources:
-- Grails GitHub repo: https://github.com/apache/grails-core
-- Issues: https://github.com/apache/grails-core/issues
+- Grails GitHub repo: https://github.com/${REPO_SLUG}
+- Issues: https://github.com/${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 b8df2f9348..648c08ead4 100644
--- a/.github/vote_templates/staged.txt
+++ b/.github/vote_templates/staged.txt
@@ -1,6 +1,6 @@
Hi Everyone,
-I am happy to start the VOTE thread for an Apache Grails release of version ${VERSION}!
+I am happy to start the VOTE thread to release ${PROJECT_NAME} ${VERSION}!
Please note the following build reproducibility issues for this release:
@@ -13,20 +13,20 @@ Pre-release discussion thread is here:
<Thread Link>
Release notes for the release are here:
-https://github.com/apache/grails-core/releases/tag/v${VERSION}
+https://github.com/${REPO_SLUG}/releases/tag/${TAG}
The tag for this release is:
-https://github.com/apache/grails-core/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/core/${VERSION}/sources
-Binary distributions: https://dist.apache.org/repos/dist/dev/grails/core/${VERSION}/distribution
+Source release: https://dist.apache.org/repos/dist/dev/grails/${SVN_FOLDER}/${VERSION}/sources
+Binary distributions: https://dist.apache.org/repos/dist/dev/grails/${SVN_FOLDER}/${VERSION}/distribution
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 ${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
@@ -36,14 +36,14 @@ https://www.apache.org/info/verification.html
Details of our release process are documented at: https://github.com/apache/grails-core/blob/HEAD/RELEASE.md
-As a reminder, most of our tools support an env `GRAILS_REPO_URL` so that the tools can be used from the staging location. Set it to the staging repo like this: `export GRAILS_REPO_URL=https://repository.apache.org/content/groups/staging`
+As a reminder, most of our tools support an env `GRAILS_REPO_URL` so that the tools can work with staged artefacts. Set it to the staging repo like this: `export GRAILS_REPO_URL=https://repository.apache.org/content/groups/staging`
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 ${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 ${VERSION} because...
+[ ] -1 Do not release ${PROJECT_NAME} ${VERSION} because...
Here is my vote:
diff --git a/.github/vote_templates/vote_succeeded.txt b/.github/vote_templates/vote_succeeded.txt
new file mode 100644
index 0000000000..f722d5d748
--- /dev/null
+++ b/.github/vote_templates/vote_succeeded.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>
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e30da1caef..dd80a0fe6d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -21,6 +21,20 @@ permissions: { }
env:
# to prevent throttling of the github api, include the github token in an environment variable since the build will check for it
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GRAILS_PUBLISH_RELEASE: true
+ JAVA_DISTRIBUTION: liberica
+ JAVA_VERSION: 17.0.17 # this must be a specific version for reproducible builds, keep it synced with .sdkmanrc
+ PROJECT_DESC: >
+ Grails is a powerful Groovy-based web application framework for the JVM,
+ built on top of Spring Boot, and supported by a rich ecosystem of plugins
+ that extend its functionality.
+ PROJECT_NAME: Apache Grails
+ REPO_NAME: ${{ github.event.repository.name }}
+ REPO_SLUG: ${{ github.repository }}
+ SVN_FOLDER: core
+ TAG: ${{ github.event.release.tag_name }}
+ TARGET_BRANCH: ${{ github.event.release.target_commitish }}
+ VERSION: will be computed in each job
jobs:
publish:
name: "Stage Jar Files"
@@ -28,247 +42,184 @@ jobs:
contents: write # to create release & upload wrapper
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 }}
- target_branch: ${{ steps.extract_branch.outputs.value }}
- extract_repository_name: ${{ steps.extract_repository_name.outputs.repository_name }}
steps:
- - name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
+ - name: "π Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
+ - 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: "π₯ Checkout repository"
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
+ ref: ${{ env.TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
- ref: ${{ github.ref }}
- fetch-depth: 1
- fetch-tags: true
- - name: 'Ensure Common Build Date' # to ensure a reproducible build
+ - 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
gpg --list-keys
- 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.14' # this must be a specific version for reproducible builds
+ distribution: ${{ env.JAVA_DISTRIBUTION }}
+ 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: "π Store the target branch"
- id: extract_branch
- run: |
- echo "Determining Target Branch"
- TARGET_BRANCH=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'`
- echo $TARGET_BRANCH
- echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
- - name: "π Store the current release version"
- id: release_version
- run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
- - name: 'βοΈ Run pre-release'
+ 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 }}
+ RELEASE_VERSION: ${{ env.VERSION }}
RELEASE_SCRIPT_PATH: '.github/scripts/setReleasedGrailsVersion.sh'
- - 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 grails-core Assemble"
- run: ./gradlew assemble -PgithubBranch=${{ steps.extract_branch.outputs.value }}
- env:
- GRAILS_PUBLISH_RELEASE: "true"
- - name: "π§© Run grails-forge Assemble"
+ - name: "π§© Run grails-core assemble"
+ run: ./gradlew assemble -PgithubBranch=${TARGET_BRANCH}
+ - name: "π§© Run grails-forge assemble"
working-directory: grails-forge
- run: ./gradlew assemble -PgithubBranch=${{ steps.extract_branch.outputs.value }}
- env:
- GRAILS_PUBLISH_RELEASE: "true"
+ run: ./gradlew assemble -PgithubBranch=${TARGET_BRANCH}
- name: "π¦ Generate grails-core docs"
- run: ./gradlew grails-doc:build -PgithubBranch=${{ steps.extract_branch.outputs.value }}
- env:
- GRAILS_PUBLISH_RELEASE: "true"
- - name: "π Sign wrapper ZIP"
- env:
- GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
- run: |
- gpg --default-key "${GPG_KEY_ID}" --batch --yes --pinentry-mode loopback --armor --detach-sign grails-wrapper/build/distributions/apache-grails-wrapper-${{ steps.release_version.outputs.value }}-bin.zip
- - name: "π¦ Create wrapper checksum"
+ run: ./gradlew grails-doc:build -PgithubBranch=${TARGET_BRANCH}
+ - name: "π Sign grails-wrapper ZIP"
+ run: >
+ gpg
+ --default-key "${{ secrets.GPG_KEY_ID }}"
+ --batch
+ --yes
+ --pinentry-mode loopback
+ --armor
+ --detach-sign
+ grails-wrapper/build/distributions/apache-grails-wrapper-${VERSION}-bin.zip
+ - name: "π¦ Create grails-wrapper checksum"
run: |
cd grails-wrapper/build/distributions
ls
- sha512sum apache-grails-wrapper-${{ steps.release_version.outputs.value }}-bin.zip > "apache-grails-wrapper-${{ steps.release_version.outputs.value }}-bin.zip.sha512"
+ sha512sum apache-grails-wrapper-${VERSION}-bin.zip > apache-grails-wrapper-${VERSION}-bin.zip.sha512
echo "Generated checksum for grails wrapper ZIP:"
- cat apache-grails-wrapper-${{ steps.release_version.outputs.value }}-bin.zip.sha512
- - name: "π€ Upload grails wrapper ZIP"
+ cat apache-grails-wrapper-${VERSION}-bin.zip.sha512
+ - name: "π€ Upload grails-wrapper ZIP"
uses: softprops/action-gh-release@v2
with:
- tag_name: ${{ github.event.release.tag_name }}
+ tag_name: ${{ env.TAG }}
files: |
- grails-wrapper/build/distributions/apache-grails-wrapper-${{ steps.release_version.outputs.value }}-bin.zip
- grails-wrapper/build/distributions/apache-grails-wrapper-${{ steps.release_version.outputs.value }}-bin.zip.sha512
- grails-wrapper/build/distributions/apache-grails-wrapper-${{ steps.release_version.outputs.value }}-bin.zip.asc
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: "π Sign CLI ZIP"
- env:
- GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
- run: |
- gpg --default-key "${GPG_KEY_ID}" --batch --yes --pinentry-mode loopback --armor --detach-sign grails-forge/grails-cli/build/distributions/apache-grails-${{ steps.release_version.outputs.value }}-bin.zip
- - name: "π¦ Create CLI checksum"
+ grails-wrapper/build/distributions/apache-grails-wrapper-${{ env.VERSION }}-bin.zip
+ grails-wrapper/build/distributions/apache-grails-wrapper-${{ env.VERSION }}-bin.zip.sha512
+ grails-wrapper/build/distributions/apache-grails-wrapper-${{ env.VERSION }}-bin.zip.asc
+ - name: "π Sign grails-cli ZIP"
+ run: >
+ gpg
+ --default-key "${{ secrets.GPG_KEY_ID }}"
+ --batch
+ --yes
+ --pinentry-mode loopback
+ --armor
+ --detach-sign
+ grails-forge/grails-cli/build/distributions/apache-grails-${VERSION}-bin.zip
+ - name: "π¦ Create grails-cli checksum"
run: |
cd grails-forge/grails-cli/build/distributions
ls
- sha512sum apache-grails-${{ steps.release_version.outputs.value }}-bin.zip > "apache-grails-${{ steps.release_version.outputs.value }}-bin.zip.sha512"
+ sha512sum apache-grails-${VERSION}-bin.zip > apache-grails-${VERSION}-bin.zip.sha512
echo "Generated checksum for grails cli ZIP:"
- cat apache-grails-${{ steps.release_version.outputs.value }}-bin.zip.sha512
- - name: "π€ Upload CLI ZIP"
+ cat apache-grails-${VERSION}-bin.zip.sha512
+ - name: "π€ Upload grails-cli ZIP"
uses: softprops/action-gh-release@v2
with:
- tag_name: ${{ github.event.release.tag_name }}
+ tag_name: ${{ env.TAG }}
files: |
- grails-forge/grails-cli/build/distributions/apache-grails-${{ steps.release_version.outputs.value }}-bin.zip
- grails-forge/grails-cli/build/distributions/apache-grails-${{ steps.release_version.outputs.value }}-bin.zip.sha512
- grails-forge/grails-cli/build/distributions/apache-grails-${{ steps.release_version.outputs.value }}-bin.zip.asc
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: "Create Staging Repository"
+ grails-forge/grails-cli/build/distributions/apache-grails-${{ env.VERSION }}-bin.zip
+ grails-forge/grails-cli/build/distributions/apache-grails-${{ env.VERSION }}-bin.zip.sha512
+ grails-forge/grails-cli/build/distributions/apache-grails-${{ env.VERSION }}-bin.zip.asc
+ - 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_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 }}'
- SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
- working-directory: 'grails-gradle'
- run: >
- ./gradlew initializeSonatypeStagingRepository
- - name: "π€ Publish Gradle Plugins"
+ NEXUS_PUBLISH_DESCRIPTION: '${{ env.REPO_NAME }}:${{ env.VERSION }}'
+ run: ./gradlew initializeSonatypeStagingRepository
+ - name: "π€ Publish Gradle Plugins 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 }}:${{ env.VERSION }}'
SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
- working-directory: 'grails-gradle'
+ working-directory: grails-gradle
run: >
./gradlew
-x initializeSonatypeStagingRepository
- findSonatypeStagingRepository
- publishToSonatype
+ findSonatypeStagingRepository
+ publishToSonatype
aggregateChecksums
aggregatePublishedArtifacts
- - name: "π€ Publish grails-core"
+ - name: "π€ Publish grails-core 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 }}:${{ env.VERSION }}'
SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
run: >
./gradlew
-x initializeSonatypeStagingRepository
- findSonatypeStagingRepository
- publishToSonatype
+ findSonatypeStagingRepository
+ publishToSonatype
aggregateChecksums
aggregatePublishedArtifacts
- - name: "π€ Publish grails-forge"
+ - name: "π€ Publish grails-forge 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 }}:${{ env.VERSION }}'
SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
- working-directory: "grails-forge"
+ working-directory: grails-forge
run: >
./gradlew
-x initializeSonatypeStagingRepository
- findSonatypeStagingRepository
- publishToSonatype
+ findSonatypeStagingRepository
+ publishToSonatype
aggregateChecksums
aggregatePublishedArtifacts
- - name: "π€ Close Staging Repository"
+ - name: "β
Close 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 }}'
- SIGNING_KEY: ${{ secrets.GPG_KEY_ID }}
+ NEXUS_PUBLISH_DESCRIPTION: '${{ env.REPO_NAME }}:${{ env.VERSION }}'
run: >
./gradlew
-x initializeSonatypeStagingRepository
findSonatypeStagingRepository
closeSonatypeStagingRepository
- - name: "π©ΉCombine checksums"
+ - name: "π©Ή Combine checksums"
run: |
combined_file="build/CHECKSUMS.txt"
cat build/grails-core-checksums.txt > "$combined_file"
cat grails-gradle/build/grails-gradle-checksums.txt >> "$combined_file"
cat grails-forge/build/grails-forge-checksums.txt >> "$combined_file"
- - name: "Upload combined checksums"
- uses: softprops/action-gh-release@v2
- with:
- tag_name: ${{ github.event.release.tag_name }}
- files: build/CHECKSUMS.txt
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: "π©ΉCombine published artifacts"
+ - name: "π©Ή Combine published artifacts"
run: |
combined_file="build/PUBLISHED_ARTIFACTS.txt"
cat build/grails-core-artifacts.txt > "$combined_file"
cat grails-gradle/build/grails-gradle-artifacts.txt >> "$combined_file"
cat grails-forge/build/grails-forge-artifacts.txt >> "$combined_file"
- - name: "Upload combined published artifacts"
- uses: softprops/action-gh-release@v2
- with:
- tag_name: ${{ github.event.release.tag_name }}
- files: build/PUBLISHED_ARTIFACTS.txt
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: "Generate Build Date file"
+ - name: "π
Generate build date file"
run: echo "$SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt
- - name: "Upload Build Date file"
+ - name: "π€ Upload build date, checksums and published artifact files"
uses: softprops/action-gh-release@v2
with:
- tag_name: ${{ github.event.release.tag_name }}
- 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:
name: "Create Source Distribution"
needs: publish
@@ -276,12 +227,14 @@ jobs:
contents: write
runs-on: ubuntu-24.04
steps:
+ - name: "π Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: "π₯ Checkout grails-core repository"
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
+ path: grails
+ ref: ${{ env.TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
- ref: v${{ needs.publish.outputs.release_version }}
- path: "grails"
- name: "ποΈ Remove unnecessary files"
run: |
rm -f grails/gradle/wrapper/gradle-wrapper.jar
@@ -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
+ apache-grails-${{ env.VERSION }}-src.zip.sha512
+ apache-grails-${{ env.VERSION }}-src.zip.asc
+ - name: "ποΈ Remove CHECKSUMS.txt asset from release"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
- gh release --repo ${{ github.repository }} delete-asset v${{ needs.publish.outputs.release_version }} CHECKSUMS.txt --yes
- - name: "Remove BUILD_DATE.txt asset from release"
- working-directory: "grails"
+ gh release delete-asset \
+ ${TAG} \
+ CHECKSUMS.txt \
+ --repo ${REPO_SLUG} \
+ --yes
+ - name: "ποΈ Remove BUILD_DATE.txt asset from release"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
- gh release --repo ${{ github.repository }} delete-asset v${{ needs.publish.outputs.release_version }} BUILD_DATE.txt --yes
- - name: "Remove PUBLISHED_ARTIFACTS.txt asset from release"
- working-directory: "grails"
+ gh release delete-asset \
+ ${TAG} \
+ BUILD_DATE.txt \
+ --repo ${REPO_SLUG} \
+ --yes
+ - name: "ποΈ Remove PUBLISHED_ARTIFACTS.txt asset from release"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
- gh release --repo ${{ github.repository }} delete-asset v${{ needs.publish.outputs.release_version }} PUBLISHED_ARTIFACTS.txt --yes
+ gh release delete-asset \
+ ${TAG} \
+ PUBLISHED_ARTIFACTS.txt \
+ --repo ${REPO_SLUG} \
+ --yes
upload:
name: "Upload Distributions to dist.apache.org"
needs: [ publish, source ]
@@ -375,116 +337,119 @@ 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: "Setup SVN and Tools"
+ - 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"
+ - name: "π Ensure dev/grails 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"
+ 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"
else
- echo "Dev Folder 'grails' does not exist, creating"
- svnmucc --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive \
+ 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 core folder exists"
+ - name: "π Ensure dev/grails/${{ env.SVN_FOLDER }} folder exists"
run: |
set -e
-
- if svn ls https://dist.apache.org/repos/dist/dev/grails/core --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive; then
- echo "Dev Folder 'grails/core' 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/core' does not exist, creating"
- svnmucc --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive \
- mkdir https://dist.apache.org/repos/dist/dev/grails/core \
- -m "Create 'grails' dev folder"
+ 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/${SVN_FOLDER} \
+ -m "Create 'grails/${SVN_FOLDER}' dev folder"
fi
- - name: "Checkout dev repo"
+ - name: "π₯ Checkout dev repo"
run: |
- svn checkout --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive https://dist.apache.org/repos/dist/dev/grails/core dev-repo
- - name: "Remove existing dev version"
+ 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 dev version $VERSION" --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive
+ if [ -d "${VERSION}" ]; then
+ svn delete "${VERSION}"
+ 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"
+ - 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-grails-$VERSION-src.zip
- curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-src.zip.sha512
- curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-src.zip.asc
+ mkdir -p ${VERSION}/sources
+ cd ${VERSION}/sources
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-${VERSION}-src.zip
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-${VERSION}-src.zip.sha512
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-${VERSION}-src.zip.asc
echo "Downloaded the following files:"
ls -l
- - name: "Fetch binary distributions"
+ - name: "π₯ Fetch binary distributions"
run: |
- export TAG="v${{ needs.publish.outputs.release_version }}"
- export VERSION="${{ needs.publish.outputs.release_version }}"
cd dev-repo
- mkdir -p $VERSION/distribution
- cd $VERSION/distribution
- curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-bin.zip
- curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-bin.zip.sha512
- curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-$VERSION-bin.zip.asc
- curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-wrapper-$VERSION-bin.zip
- curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-wrapper-$VERSION-bin.zip.sha512
- curl -f -LO https://github.com/apache/${{ needs.publish.outputs.extract_repository_name }}/releases/download/$TAG/apache-grails-wrapper-$VERSION-bin.zip.asc
+ mkdir -p ${VERSION}/distribution
+ cd ${VERSION}/distribution
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-${VERSION}-bin.zip
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-${VERSION}-bin.zip.sha512
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-${VERSION}-bin.zip.asc
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-wrapper-${VERSION}-bin.zip
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-wrapper-${VERSION}-bin.zip.sha512
+ curl -f -LO https://github.com/${REPO_SLUG}/releases/download/${TAG}/apache-grails-wrapper-${VERSION}-bin.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"
+ - 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"
- - name: "Upload Distribution SVN revision"
+ svn info ${VERSION} > DIST_SVN_REVISION.txt
+ - name: "π€ Upload Distribution SVN revision"
uses: softprops/action-gh-release@v2
with:
- tag_name: ${{ github.event.release.tag_name }}
+ 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: "grails-core"
- - name: 'Grails Vote Email'
+ path: ${{ env.REPO_NAME }}
+ ref: ${{ env.TAG }}
+ - 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 "TO:"
+ echo "*************************************************"
+ echo "dev@grails.apache.org"
+ echo "*************************************************"
+ echo ""
echo "Subject:"
echo "*************************************************"
- echo "[VOTE] Release Apache Grails ${VERSION}"
+ echo "[VOTE] Release ${PROJECT_NAME} ${VERSION}"
echo "*************************************************"
echo "Body:"
echo "*************************************************"
- cat grails-core/.github/vote_templates/staged.txt | envsubst
+ cat ${REPO_NAME}/.github/vote_templates/staged.txt | envsubst
echo "*************************************************"
echo "::endgroup::"
release:
@@ -493,35 +458,60 @@ 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: "Setup SVN and Tools"
+ - name: "π Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
+ - name: "π₯ Checkout repository"
+ uses: actions/checkout@v5
+ with:
+ ref: ${{ env.TAG }}
+ - 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 dev@grails.apache.org completed successfully."
+ echo "π Make sure that the vote confirmation on dev@grails.apache.org completed successfully before proceeding."
echo "::endgroup::"
- - name: "π Release JAR files - MANUAL"
+ - 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 "dev@grails.apache.org"
+ 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: "π MANUAL - Release JAR files"
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 ${REPO_NAME}:${VERSION} <ASF_USER>"
echo "::endgroup::"
- - name: "π Release distribution artifacts - MANUAL"
+ - name: "π MANUAL - Release distribution artifacts"
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"
+ - name: "β
MANUAL - Update ASF Reporter"
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 no-reply@reporter.apache.org & update https://reporter.apache.org/addrelease.html?grails to add ${SVN_FOLDER^^}-${VERSION} as complete as of ${TODAY}"
echo "::endgroup::"
- - name: "β
Deploy grails-forge - MANUAL"
+ - name: "π MANUAL - Deploy Grails Forge"
run: |
- echo "::group::Manual grails-forge deployment"
- echo "Kick off Forge-* workflow for version ${{ needs.publish.outputs.release_version }} based on the below rules:"
+ echo "::group::Manual Grails Forge deployment"
+ echo "Kick off Forge-* workflow for version ${VERSION} based on the below rules:"
cat <<'EOF'
* RELEASE - GA releases only
* NEXT - Milestones and Release Candidate
@@ -533,10 +523,12 @@ jobs:
docs:
environment: docs
name: "VOTE SUCCEEDED - Publish Documentation"
- needs: [ publish, source, upload ] # TODO Once we have confirmed release won't fail, add it as a dependency here
+ needs: [ publish, source, upload, release ]
runs-on: ubuntu-24.04
steps:
- - name: Maximize build space
+ - name: "π Establish release version"
+ run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
+ - name: "βοΈ Maximize build space"
uses: easimon/maximize-build-space@c28619d8999a147d5e09c1199f84ff6af6ad5794
with:
root-reserve-mb: 3072 # Leave ~3 GB on root FS
@@ -547,66 +539,64 @@ jobs:
remove-codeql: 'true' # Remove CodeQL (~500 MB savings)
remove-docker-images: 'false' # Prune Docker if used (~1-2 GB savings)
- name: "π₯ Checkout repository"
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
fetch-depth: 0 # need the full history to find all tags
token: ${{ secrets.GITHUB_TOKEN }}
- ref: v${{ needs.publish.outputs.release_version }}
- - name: 'Ensure Common Build Date' # to ensure a reproducible build
+ ref: ${{ env.TAG }}
+ - 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
- distribution: liberica
+ distribution: ${{ env.JAVA_DISTRIBUTION }}
+ 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: "π Generate Documentation"
- run: ./gradlew grails-doc:build -PgithubBranch=${{ needs.publish.outputs.target_branch }}
- env:
- GRAILS_PUBLISH_RELEASE: 'true'
- - name: "π Publish to Github Pages"
+ run: ./gradlew grails-doc:build -PgithubBranch=${TARGET_BRANCH}
+ - name: "π Publish to GitHub Pages"
uses: apache/grails-github-actions/deploy-github-pages@asf
env:
GH_TOKEN: ${{ secrets.GRAILS_GHTOKEN }}
GRADLE_PUBLISH_RELEASE: 'true'
SOURCE_FOLDER: grails-doc/build/docs
- VERSION: ${{ needs.publish.outputs.release_version }}
- TARGET_REPOSITORY: 'apache/grails-website'
- TARGET_FOLDER: 'docs'
- DOCUMENTATION_BRANCH: 'asf-site-production'
+ TARGET_REPOSITORY: apache/grails-website
+ TARGET_FOLDER: docs
+ DOCUMENTATION_BRANCH: asf-site-production
sdkman:
environment: sdkman
name: "VOTE SUCCEEDED - Release to SDKMAN!"
runs-on: ubuntu-24.04
- needs: [ publish, source, upload ] # TODO Once we have confirmed release won't fail, add it as a dependency here
+ needs: [ publish, source, upload, release ]
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 }}
+ ref: ${{ env.TAG }}
- name: "βοΈ Setup JDK"
- uses: actions/setup-java@v4
+ uses: actions/setup-java@v5
with:
- distribution: 'liberica'
- java-version: '17'
+ distribution: ${{ env.JAVA_DISTRIBUTION }}
+ 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: "π Grails SDK Minor Release"
- if: contains(needs.publish.outputs.release_version, 'M')
- working-directory: 'grails-forge'
+ if: contains(env.VERSION, 'M')
+ working-directory: grails-forge
run: ./gradlew sdkMinorRelease
env:
GVM_SDKVENDOR_KEY: ${{ secrets.GVM_SDKVENDOR_KEY }}
GVM_SDKVENDOR_TOKEN: ${{ secrets.GVM_SDKVENDOR_TOKEN }}
- name: "π Grails SDK Major Release"
- if: startsWith(needs.publish.outputs.release_version, '7.') && !contains(needs.publish.outputs.release_version, 'M')
- working-directory: 'grails-forge'
+ if: startsWith(env.VERSION, '7.') && !contains(env.VERSION, 'M')
+ working-directory: grails-forge
run: ./gradlew sdkMajorRelease
env:
GVM_SDKVENDOR_KEY: ${{ secrets.GVM_SDKVENDOR_KEY }}
@@ -614,7 +604,7 @@ jobs:
close:
name: "VOTE SUCCEEDED - Close Release"
environment: release
- needs: [ publish, source, upload, docs, sdkman ] # TODO Once we have confirmed release won't fail, add it as a dependency here
+ needs: [ publish, source, upload, release, docs, sdkman ]
runs-on: ubuntu-24.04
permissions:
contents: write # required for gradle.properties revert
@@ -622,42 +612,36 @@ 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:
+ ref: ${{ env.TAG }}
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
- 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: "βοΈ Run post-release"
uses: apache/grails-github-actions/post-release@asf
env:
RELEASE_SCRIPT_PATH: '.github/scripts/setSnapshotGrailsVersion.sh'
- - name: 'π Create Blog Post - MANUAL'
+ - name: "π MANUAL - Create Blog Post"
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'
+ - name: 'π§ Announcement Email'
run: |
echo "::group::Announcement Email"
+ echo ""
+ echo "TO:"
+ echo "*************************************************"
+ echo "announce@apache.org, dev@grails.apache.org, users@grails.apache.org"
+ echo "*************************************************"
+ echo ""
echo "Subject:"
echo "*************************************************"
- echo "[ANNOUNCE] Apache Grails ${VERSION}"
+ echo "[ANNOUNCE] ${PROJECT_NAME} ${VERSION}"
echo "*************************************************"
+ echo ""
echo "Body:"
echo "*************************************************"
cat .github/vote_templates/announce.txt | envsubst
diff --git a/.sdkmanrc b/.sdkmanrc
index 10f27b0be6..5b1ad473f8 100644
--- a/.sdkmanrc
+++ b/.sdkmanrc
@@ -1,3 +1,3 @@
-java=17.0.14-librca
+java=17.0.17-librca
gradle=8.14.3
diff --git a/etc/bin/Dockerfile b/etc/bin/Dockerfile
index cd3e9696cd..9a630fe50b 100644
--- a/etc/bin/Dockerfile
+++ b/etc/bin/Dockerfile
@@ -16,7 +16,7 @@
# for testing in a container that is similar to the grails github action linux build environment
# run this from the root of the project
# `docker build -t grails:testing -f etc/bin/Dockerfile . && docker run -it --rm -v $(pwd):/home/groovy/project grails:testing bash`
-FROM bellsoft/liberica-openjdk-debian:17.0.14
+FROM bellsoft/liberica-openjdk-debian:17.0.17
USER root
RUN apt-get update && apt-get install -y curl unzip coreutils libdigest-sha-perl gpg vim sudo psmisc locales groovy rsync
diff --git a/etc/bin/verify.sh b/etc/bin/verify.sh
index ddd63ecaaa..ec9d57cf22 100755
--- a/etc/bin/verify.sh
+++ b/etc/bin/verify.sh
@@ -65,7 +65,7 @@ echo "Using Java at ..."
which java
java -version
-echo "Writing out custom repo script"
+echo "Writing Gradle init script to use staging repo"
echo """
allprojects {
buildscript {
@@ -83,8 +83,8 @@ echo """
}
}
-""" > "${DOWNLOAD_LOCATION}/custom-repos.gradle"
-echo "β
Custom repo script written"
+""" > "${DOWNLOAD_LOCATION}/use-staging-repo.gradle"
+echo "β
Gradle staging repo init script written"
echo "Determining Gradle on PATH ..."
if GRADLE_CMD="$(command -v gradlew 2>/dev/null)"; then
@@ -114,11 +114,12 @@ set -e
echo "β
Reproducible Build Verified"
echo "Be sure to do the following:"
-echo "βοΈ Set the override repo: 'export GRAILS_REPO_URL=https://repository.apache.org/content/groups/staging' "
-echo "βοΈ Run the wrapper ShellApp: cd ${DOWNLOAD_LOCATION}/apache-grails-wrapper-${VERSION}-bin/ShellApp && ./gradlew bootRun --init-script ~/grails-verify/custom-repos.gradle"
-echo "βοΈ Run the wrapper ForgeApp: cd ${DOWNLOAD_LOCATION}/apache-grails-wrapper-${VERSION}-bin/ForgeApp && ./gradlew bootRun --init-script ~/grails-verify/custom-repos.gradle"
-echo "βοΈ Run the cli ShellApp: cd ${DOWNLOAD_LOCATION}/apache-grails-${VERSION}-bin/bin/ShellApp && ./gradlew bootRun --init-script ~/grails-verify/custom-repos.gradle"
-echo "βοΈ Run the cli ForgeApp: cd ${DOWNLOAD_LOCATION}/apache-grails-${VERSION}-bin/bin/ForgeApp && ./gradlew bootRun --init-script ~/grails-verify/custom-repos.gradle"
+echo "βοΈ Set the override repo: 'export GRAILS_REPO_URL=https://repository.apache.org/content/groups/staging'"
+echo "βοΈ Run the wrapper ShellApp: cd ${DOWNLOAD_LOCATION}/apache-grails-wrapper-${VERSION}-bin/ShellApp && ./gradlew bootRun --init-script ${DOWNLOAD_LOCATION}/use-staging-repo.gradle"
+echo "βοΈ Run the wrapper ForgeApp: cd ${DOWNLOAD_LOCATION}/apache-grails-wrapper-${VERSION}-bin/ForgeApp && ./gradlew bootRun --init-script ${DOWNLOAD_LOCATION}/use-staging-repo.gradle"
+echo "βοΈ Run the cli ShellApp: cd ${DOWNLOAD_LOCATION}/apache-grails-${VERSION}-bin/bin/ShellApp && ./gradlew bootRun --init-script ${DOWNLOAD_LOCATION}/use-staging-repo.gradle"
+echo "βοΈ Run the cli ForgeApp: cd ${DOWNLOAD_LOCATION}/apache-grails-${VERSION}-bin/bin/ForgeApp && ./gradlew bootRun --init-script ${DOWNLOAD_LOCATION}/use-staging-repo.gradle"
+# BELOW STEP NEEDS CLARIFICATION
echo "βοΈ Add the local repos to the application and then run the shell cli from one of the applications and ensure all commands show as expected - pay attention to the scaffolding ones since they are dynamically loaded"
echo "β
β
β
Verification finished, see above instructions for remaining manual testing."
\ No newline at end of file