Skip to content

Commit 93be60c

Browse files
authored
Merge pull request #1166 from apache/7.0.x
Rebased 7.0.x
2 parents c749429 + 64795cd commit 93be60c

File tree

36 files changed

+498
-156
lines changed

36 files changed

+498
-156
lines changed

.asf.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
github:
22
environments:
3-
source:
4-
required_reviewers:
5-
- id: grails-committers
6-
type: Team
7-
- id: jdaugherty
8-
type: User
9-
wait_timer: 0
103
release:
114
required_reviewers:
125
- id: grails-committers

.github/release-drafter.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ version-resolver:
132132
- 'type: patch'
133133
default: patch
134134
template: |
135+
## Disclaimer: Release Created While Under Incubation
136+
137+
Apache Grails is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Groovy Project. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
138+
135139
## What's Changed
136140
137141
$CHANGES

.github/renovate.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"org.grails:grails-plugin-databinding",
4545
"org.grails:grails-plugin-datasource",
4646
"org.grails:grails-plugin-domain-class",
47-
"org.grails:grails-plugin-i18n",
4847
"org.grails:grails-plugin-interceptors",
4948
"org.grails:grails-plugin-mimetypes",
5049
"org.grails:grails-plugin-rest",
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
The Apache Grails (incubating) community is pleased to announce the release of Apache Grails (incubating) Spring Security Plugin ${VERSION}.
2+
3+
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.
4+
5+
This Spring Security Plugin 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://docs.grails.org/${VERSION}/guide/upgrading.html.
6+
7+
The release notes are available here:
8+
https://github.com/apache/grails-spring-security/compare/v${VERSION}
9+
10+
For the complete list of changes:
11+
https://github.com/apache/grails-spring-security/compare/v${PREVIOUS_VERSION}...v${VERSION}
12+
13+
Apache Grails website: https://grails.apache.org/
14+
15+
Download Links: https://grails.apache.org/download.html
16+
17+
Grails Resources:
18+
- Grails Spring Security GitHub repo: https://github.com/apache/grails-spring-security
19+
- Issues: https://github.com/apache/grails-spring-security/issues
20+
- Mailing lists: https://grails.apache.org/community.html
21+
22+
Happy Coding,
23+
The Apache Grails (incubating) Team
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Hi Everyone,
2+
3+
The Apache Grails community has voted to approve the release of Apache Grails Spring Security Plugin ${VERSION}.
4+
5+
As the incubation host, we now kindly request the Groovy PMC to review & approve our ASF release.
6+
7+
Grails vote thread:
8+
* <VOTE THREAD LINK>
9+
10+
Vote result thread:
11+
* https://<TODO>
12+
13+
The tag for this release is:
14+
* (grails-spring-security) https://github.com/apache/grails-spring-security/releases/tag/v${VERSION}
15+
16+
The artifacts to be voted on are located as follows (r${DIST_SVN_REVISION}):
17+
Source release: https://dist.apache.org/repos/dist/dev/incubator/grails/spring-security/${VERSION}/sources
18+
19+
Release artifacts are signed with a key from the following file:
20+
https://dist.apache.org/repos/dist/release/incubator/grails/KEYS
21+
22+
Please vote on releasing this package as Apache Grails (incubating) Spring Security Plugin ${VERSION}.
23+
24+
Hints on validating checksums/signatures (but replace md5sum with sha512sum):
25+
https://www.apache.org/info/verification.html
26+
27+
The vote for this release is open for a minimum of 72 hours.
28+
[ ] +1 Release Apache Grails (incubating) Spring Security Plugin ${VERSION}
29+
[ ] 0 I don't have a strong opinion about this, but I assume it's ok
30+
[ ] -1 Do not release Apache Grails (incubating) Spring Security Plugin ${VERSION} because...

.github/vote_templates/staged.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Hi Everyone,
2+
3+
I am happy to start the VOTE thread for an Apache Grails (incubating) Spring Security Plugin release of version ${VERSION}!
4+
5+
Release notes for the release are here:
6+
https://github.com/apache/grails-spring-security/releases/tag/v${VERSION}
7+
8+
The tag for this release is:
9+
https://github.com/apache/grails-spring-security/releases/tag/v${VERSION}
10+
Tag commit id: ${VERSION_COMMIT_ID}
11+
12+
The artifacts to be voted on are located as follows (r${DIST_SVN_REVISION}):
13+
Source release: https://dist.apache.org/repos/dist/dev/incubator/grails/spring-security/${VERSION}/sources
14+
15+
Release artifacts are signed with a key from the following file:
16+
https://dist.apache.org/repos/dist/release/incubator/grails/KEYS
17+
18+
Please vote on releasing this package as: Apache Grails (incubating) Spring Security Plugin ${VERSION}.
19+
20+
Reminder on ASF release approval requirements for PPMC members:
21+
https://www.apache.org/legal/release-policy.html#release-approval
22+
23+
Hints on validating checksums/signatures (but replace md5sum with sha512sum):
24+
https://www.apache.org/info/verification.html
25+
26+
The vote is open for a minimum of 72 hours and passes if a majority of at least
27+
three +1 PPMC votes are cast.
28+
29+
[ ] +1 Release Apache Grails (incubating) Spring Security Plugin ${VERSION}
30+
[ ] 0 I don't have a strong opinion about this, but I assume it's ok
31+
[ ] -1 Do not release Apache Grails (incubating) Spring Security Plugin ${VERSION} because...
32+
33+
Here is my vote:
34+
35+
+1 (binding)
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: "Release - Abort Release"
17+
on:
18+
workflow_dispatch:
19+
inputs:
20+
release_tag:
21+
description: 'Release tag (e.g., v7.0.0-M5)'
22+
required: true
23+
type: string
24+
permissions:
25+
contents: write
26+
actions: write
27+
jobs:
28+
abort:
29+
name: "Abort Release"
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
33+
run: curl -s https://api.ipify.org
34+
- name: "Setup SVN and Tools"
35+
run: sudo apt-get install -y subversion subversion-tools tree
36+
- name: "Extract repository name"
37+
id: extract_repository_name
38+
run: |
39+
echo "repository_name=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
40+
- name: "Extract release version"
41+
id: release_version
42+
run: |
43+
version="${{ github.event.inputs.release_tag }}"
44+
version="${version#v}"
45+
echo "Extracted version: $version"
46+
echo "value=${version}" >> $GITHUB_OUTPUT
47+
- name: "Drop staging repository from Nexus"
48+
continue-on-error: true
49+
env:
50+
NEXUS_STAGE_DEPLOYER_USER: ${{ secrets.NEXUS_STAGE_DEPLOYER_USER }}
51+
NEXUS_STAGE_DEPLOYER_PW: ${{ secrets.NEXUS_STAGE_DEPLOYER_PW }}
52+
run: |
53+
export REPO_DESCRIPTION="${{ steps.extract_repository_name.outputs.repository_name }}:${{ steps.release_version.outputs.value }}"
54+
export STAGING_REPOSITORY_ID=$(curl -s -u "$NEXUS_STAGE_DEPLOYER_USER:$NEXUS_STAGE_DEPLOYER_PW" -H "Accept: application/json" \
55+
"https://repository.apache.org/service/local/staging/profile_repositories/${{ secrets.STAGING_PROFILE_ID }}" |
56+
jq -r '.data[] | select(.description=="'"$REPO_DESCRIPTION"'") | .repositoryId')
57+
58+
test -n "$STAGING_REPOSITORY_ID" || { echo "No repo with that description"; exit 1; }
59+
60+
response=$(curl -s --request POST -u "$NEXUS_STAGE_DEPLOYER_USER:$NEXUS_STAGE_DEPLOYER_PW" \
61+
--url https://repository.apache.org/service/local/staging/bulk/drop \
62+
--header 'Content-Type: application/json' \
63+
--header 'Accept: application/json' \
64+
--header 'User-Agent: Grails Github Actions' \
65+
--data '{ "data" : {"stagedRepositoryIds":["'"$STAGING_REPOSITORY_ID"'"], "description":"Drop '"$STAGING_REPOSITORY_ID"'." } }')
66+
67+
if [ ! -z "$response" ]; then
68+
echo "Error while dropping staged repository $STAGING_REPOSITORY_ID : $response."
69+
exit 1
70+
else
71+
echo "Successfully dropped repository $STAGING_REPOSITORY_ID."
72+
fi
73+
- name: "Remove Staged Artifacts"
74+
continue-on-error: true
75+
env:
76+
SVN_USERNAME: ${{ secrets.SVC_DIST_GRAILS_USERNAME }}
77+
SVN_PASSWORD: ${{ secrets.SVC_DIST_GRAILS_PASSWORD }}
78+
run: |
79+
export VERSION="${{ steps.release_version.outputs.value }}"
80+
svnmucc --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive \
81+
-m "Remove grails dev version $VERSION" \
82+
rm "https://dist.apache.org/repos/dist/dev/incubator/grails/spring-security/$VERSION"
83+
- name: "Cancel GitHub Actions"
84+
continue-on-error: true
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
OWNER: ${{ github.repository_owner }}
88+
REPO: ${{ steps.extract_repository_name.outputs.repository_name }}
89+
run: |
90+
for status in queued in_progress; do
91+
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
92+
-H "Accept: application/vnd.github+json" \
93+
"https://api.github.com/repos/$OWNER/$REPO/actions/runs?event=release&status=$status&per_page=100" |
94+
jq -r '.workflow_runs[].id'
95+
done > run-ids.txt
96+
97+
while read run_id; do
98+
echo "cancelling $run_id"
99+
curl -s -X POST \
100+
-H "Authorization: Bearer $GITHUB_TOKEN" \
101+
-H "Accept: application/vnd.github+json" \
102+
"https://api.github.com/repos/$OWNER/$REPO/actions/runs/$run_id/cancel"
103+
done < run-ids.txt
104+
rm -f run-ids.txt || true
105+
- name: "Remove GitHub Release & Tag"
106+
env:
107+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
TAG: ${{ github.event.inputs.release_tag }}
109+
OWNER: ${{ github.repository_owner }}
110+
REPO: ${{ steps.extract_repository_name.outputs.repository_name }}
111+
run: |
112+
set -euo pipefail
113+
114+
if release_json="$(gh api -H 'Accept: application/vnd.github+json' \
115+
"/repos/$OWNER/$REPO/releases/tags/$TAG" 2>/dev/null)"; then
116+
if [ "$(jq -r '.prerelease' <<<"$release_json")" != "true" ]; then
117+
echo "❌ Release $TAG exists but is *not* marked as a pre-release. Aborting."
118+
exit 1
119+
fi
120+
121+
release_id="$(jq -r '.id' <<<"$release_json")"
122+
echo "Deleting pre-release $release_id linked to tag $TAG"
123+
gh api -X DELETE "/repos/$OWNER/$REPO/releases/$release_id"
124+
else
125+
echo "No GitHub release found for tag $TAG – skipping release deletion"
126+
fi
127+
128+
ref="tags/$TAG"
129+
echo "Deleting git ref $ref"
130+
gh api -X DELETE "/repos/$OWNER/$REPO/git/refs/$ref" || echo "Tag $TAG already absent"

.github/workflows/release-notes.yml

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,24 @@ on:
2121
branches:
2222
- '[4-9]+.[0-9]+.x'
2323
pull_request:
24-
types: [opened, reopened, synchronize]
25-
pull_request_target:
26-
types: [opened, reopened, synchronize]
27-
workflow_dispatch:
24+
types: [ opened, reopened, synchronize, labeled ]
25+
pull_request_target:
26+
types: [ opened, reopened, synchronize, labeled ]
27+
workflow_dispatch:
28+
# queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: false
2832
jobs:
29-
release_notes:
33+
update_release_draft:
34+
permissions:
35+
# write permission is required to create a github release
36+
contents: write
37+
# write permission is required for autolabeler
38+
pull-requests: write
3039
runs-on: ubuntu-latest
3140
steps:
32-
- uses: actions/checkout@v4
33-
- name: Check if it has release drafter config file
34-
id: check_release_drafter
35-
run: |
36-
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
37-
echo "has_release_drafter=${has_release_drafter}" >> $GITHUB_OUTPUT
38-
- name: Extract branch name
39-
id: extract_branch
40-
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
41-
# If it has release drafter:
42-
- uses: release-drafter/release-drafter@v6
43-
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
41+
- name: "📝 Update Release Draft"
42+
uses: release-drafter/release-drafter@v6
4443
env:
45-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
46-
with:
47-
commitish: ${{ steps.extract_branch.outputs.value }}
48-
# Otherwise:
49-
- name: Export Gradle Properties
50-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
51-
uses: apache/grails-github-actions/export-gradle-properties@asf
52-
- uses: apache/grails-github-actions/release-notes@asf
53-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
54-
id: release_notes
55-
with:
56-
token: ${{ secrets.GH_TOKEN }}
57-
- uses: ncipollo/release-action@1e3e9c6637e5566e185b7ab66f187539c5a76da7
58-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
59-
with:
60-
allowUpdates: true
61-
commit: ${{ steps.release_notes.outputs.current_branch }}
62-
draft: true
63-
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
64-
tag: v${{ steps.release_notes.outputs.next_version }}
65-
bodyFile: CHANGELOG.md
66-
token: ${{ secrets.GH_TOKEN }}
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)