@@ -112,7 +112,6 @@ jobs:
112112 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
113113 source :
114114 # to ensure we never publish any build artifacts, run the source distribution as a separate build workflow
115- environment : source
116115 name : " Source Distribution"
117116 needs : publish
118117 permissions :
@@ -204,10 +203,142 @@ jobs:
204203 set -e
205204 cd ${{ needs.publish.outputs.extract_repository_name }}
206205 gh release --repo ${{ github.repository }} delete-asset v${{ needs.publish.outputs.release_version }} PUBLISHED_ARTIFACTS.txt --yes
206+ upload :
207+ needs : [ publish, source ]
208+ runs-on : ubuntu-24.04
209+ permissions :
210+ contents : write
211+ env :
212+ SVN_USERNAME : ${{ secrets.SVC_DIST_GRAILS_USERNAME }}
213+ SVN_PASSWORD : ${{ secrets.SVC_DIST_GRAILS_PASSWORD }}
214+ steps :
215+ - name : " Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
216+ run : curl -s https://api.ipify.org
217+ - name : " Setup SVN and Tools"
218+ run : sudo apt-get install -y subversion subversion-tools tree gettext-base
219+ - name : " Ensure grails dev folder exists"
220+ run : |
221+ set -e
222+
223+ if svn ls https://dist.apache.org/repos/dist/dev/incubator/grails --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive; then
224+ echo "Dev Folder 'grails' already exists — skipping creation"
225+ else
226+ echo "Dev Folder 'grails' does not exist, creating"
227+ svnmucc --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive \
228+ mkdir https://dist.apache.org/repos/dist/dev/incubator/grails \
229+ -m "Create 'grails' dev folder"
230+ fi
231+ - name : " Ensure grails spring-security folder exists"
232+ run : |
233+ set -e
234+
235+ if svn ls https://dist.apache.org/repos/dist/dev/incubator/grails/spring-security --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive; then
236+ echo "Dev Folder 'grails/spring-security' already exists — skipping creation"
237+ else
238+ echo "Dev Folder 'grails/spring-security' does not exist, creating"
239+ svnmucc --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive \
240+ mkdir https://dist.apache.org/repos/dist/dev/incubator/grails/spring-security \
241+ -m "Create 'grails spring-security' dev folder"
242+ fi
243+ - name : " Checkout dev repo"
244+ run : |
245+ svn checkout --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive https://dist.apache.org/repos/dist/dev/incubator/grails/spring-security dev-repo
246+ - name : " Remove existing dev version"
247+ run : |
248+ export VERSION="${{ needs.publish.outputs.release_version }}"
249+ cd dev-repo
250+ if [ -d "$VERSION" ]; then
251+ svn delete "$VERSION"
252+ svn commit -m "Remove grails spring-security dev version $VERSION" --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive
253+ else
254+ echo "No existing dev version $VERSION to remove"
255+ fi
256+ - name : " Fetch source distributions"
257+ run : |
258+ export TAG="v${{ needs.publish.outputs.release_version }}"
259+ export VERSION="${{ needs.publish.outputs.release_version }}"
260+ cd dev-repo
261+ mkdir -p $VERSION/sources
262+ cd $VERSION/sources
263+ curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-${{ needs.publish.outputs.extract_repository_name }}-$VERSION-incubating-src.zip
264+ curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-${{ needs.publish.outputs.extract_repository_name }}-$VERSION-incubating-src.zip.sha512
265+ curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-${{ needs.publish.outputs.extract_repository_name }}-$VERSION-incubating-src.zip.asc
266+ echo "Downloaded the following files:"
267+ ls -l
268+ - name : " Upload distributions"
269+ run : |
270+ export TAG="v${{ needs.publish.outputs.release_version }}"
271+ export VERSION="${{ needs.publish.outputs.release_version }}"
272+ cd dev-repo
273+ echo "Adding the following files to SVN:"
274+ tree
275+ svn add $VERSION --force
276+ svn commit -m "Upload grails distribution files for $VERSION" --username "$SVN_USERNAME" --password "$SVN_PASSWORD" --non-interactive
277+ pwd
278+ - name : " Store Distribution SVN revision"
279+ run : |
280+ export VERSION="${{ needs.publish.outputs.release_version }}"
281+ cd dev-repo
282+ svn info $VERSION > "DIST_SVN_REVISION.txt"
283+ - name : " Upload Distribution SVN revision"
284+ uses : softprops/action-gh-release@v2
285+ with :
286+ files : dev-repo/DIST_SVN_REVISION.txt
287+ env :
288+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
289+ - name : " 📥 Checkout repository"
290+ uses : actions/checkout@v4
291+ with :
292+ token : ${{ secrets.GITHUB_TOKEN }}
293+ ref : v${{ needs.publish.outputs.release_version }}
294+ path : " ${{ needs.publish.outputs.extract_repository_name }}"
295+ - name : ' Initial Vote Email'
296+ env :
297+ VERSION : ${{ needs.publish.outputs.release_version }}
298+ VERSION_COMMIT_ID : ${{ needs.publish.outputs.commit_hash }}
299+ run : |
300+ export DIST_SVN_REVISION=$(awk '/Last Changed Rev:/ {print $4}' dev-repo/DIST_SVN_REVISION.txt)
301+
302+ echo "*************************************************"
303+ echo "Subject: [VOTE] Release Apache Grails (incubating) Spring Security Plugin ${VERSION}"
304+ echo "*************************************************"
305+ echo "Body:"
306+ echo "*************************************************"
307+ cat ${{ needs.publish.outputs.extract_repository_name }}/.github/vote_templates/staged.txt | envsubst
308+ echo "*************************************************"
309+ - name : ' Groovy Vote Email'
310+ env :
311+ VERSION : ${{ needs.publish.outputs.release_version }}
312+ VERSION_COMMIT_ID : ${{ needs.publish.outputs.commit_hash }}
313+ run : |
314+ export DIST_SVN_REVISION=$(awk '/Last Changed Rev:/ {print $4}' dev-repo/DIST_SVN_REVISION.txt)
315+
316+ echo "*************************************************"
317+ echo "Subject: [VOTE] Approval of Apache Grails (incubating) Spring Security Plugin ${VERSION} release by Groovy PMC"
318+ echo "*************************************************"
319+ echo "Body:"
320+ echo "*************************************************"
321+ cat ${{ needs.publish.outputs.extract_repository_name }}/.github/vote_templates/groovy_pmc.txt | envsubst
322+ echo "*************************************************"
323+ - name : ' Announcement Email'
324+ env :
325+ VERSION : ${{ needs.publish.outputs.release_version }}
326+ VERSION_COMMIT_ID : ${{ needs.publish.outputs.commit_hash }}
327+ PREVIOUS_VERSION : ' TODO_PREVIOUS_VERSION'
328+ run : |
329+ export DIST_SVN_REVISION=$(awk '/Last Changed Rev:/ {print $4}' dev-repo/DIST_SVN_REVISION.txt)
330+
331+ echo "*************************************************"
332+ echo "Subject: [ANNOUNCE] Apache Grails (incubating) Spring Security Plugin ${VERSION}"
333+ echo "*************************************************"
334+ echo "Body:"
335+ echo "*************************************************"
336+ cat ${{ needs.publish.outputs.extract_repository_name }}/.github/vote_templates/announce.txt | envsubst
337+ echo "*************************************************"
207338 docs :
208339 environment : docs
209340 name : " Publish Documentation"
210- needs : [publish, source]
341+ needs : [publish, source, upload ]
211342 runs-on : ubuntu-latest
212343 permissions :
213344 contents : write # required for gradle.properties revert
@@ -243,7 +374,7 @@ jobs:
243374 release :
244375 name : " Close Release"
245376 environment : release
246- needs : [ publish, source, docs ]
377+ needs : [ publish, source, upload, docs ]
247378 runs-on : ubuntu-latest
248379 permissions :
249380 contents : write # required for gradle.properties revert
0 commit comments