You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2025/05/29 16:50:53 UTC

(grails-core) 02/03: [skip ci] distribution upload

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

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

commit 904d7c760dd6fef105883f3bb9b360bd65561828
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Thu May 29 12:48:03 2025 -0400

    [skip ci] distribution upload
---
 .github/workflows/release-upload.yml | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/.github/workflows/release-upload.yml b/.github/workflows/release-upload.yml
new file mode 100644
index 0000000000..826721ded1
--- /dev/null
+++ b/.github/workflows/release-upload.yml
@@ -0,0 +1,96 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "Release - Upload to dist.apache.org"
+on:
+  workflow_dispatch:
+jobs:
+  asf_release:
+    runs-on: ubuntu-latest
+    env:
+      SVN_USERNAME: ${{ secrets.SVC_DIST_GRAILS_USERNAME }}
+      SVN_PASSWORD: ${{ secrets.SVC_DIST_GRAILS_PASSWORD }}
+    steps:
+      - name: "Extract release version"
+        id: release_version
+        run: |
+          version="${{ github.ref_name }}"
+          echo "version=${version#v}" >> $GITHUB_OUTPUT
+      - name: "📥 Checkout repository"
+        uses: actions/checkout@v4
+        with:
+          repository: apache/grails-core
+          ref: ${{ github.ref_name }}
+          path: grails-core
+      - name: "Setup SVN"
+        run: sudo apt-get install -y subversion
+      - name: "Checkout release repo"
+        run: |
+          svn checkout --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" https://dist.apache.org/repos/dist/release release-repo
+      - name: "Update KEYS file"
+        run: |
+          mkdir -p release-repo/grails
+          if ! cmp -s grails-core/KEYS release-repo/grails/KEYS; then
+            echo "KEYS file differs — committing update"
+            cp grails-core/KEYS release-repo/grails/
+            cd release-repo/grails
+            svn add KEYS --force
+            svn commit -m "Update grails KEYS file" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+          else
+            echo "KEYS file unchanged — skipping commit"
+          fi
+      - name: "Checkout dev repo"
+        run: |
+          svn checkout --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" https://dist.apache.org/repos/dist/dev dev-repo
+      - name: "Remove existing dev version"
+        run: |
+          VERSION="${{ steps.release_version.outputs.version }}"
+          mkdir -p dev-repo/grails
+          cd dev-repo/grails
+          if [ -d "$VERSION" ]; then
+            svn delete "$VERSION"
+            svn commit -m "Remove grails dev version $VERSION" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+          else 
+            echo "No existing dev version $VERSION to remove"
+          fi
+      - name: "Upload source distribution"
+        run: |
+          TAG=${{ steps.release_version.outputs.tag_name }}
+          VERSION=${{ steps.release_version.outputs.version }}
+          mkdir -p dev-repo/grails/$VERSION/source
+          cd dev-repo/grails/$VERSION/source
+          curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-$VERSION-incubating-src.zip
+          curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-$VERSION-incubating-src.zip.asc
+          svn add . --force
+          svn commit -m "Upload grails source files for $VERSION" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+      - name: "Upload grails binary distribution"
+        run: |
+          TAG=${{ steps.release_version.outputs.tag_name }}
+          VERSION=${{ steps.release_version.outputs.version }}
+          mkdir -p dev-repo/grails/$VERSION/distribution
+          cd dev-repo/grails/$VERSION/distribution
+          curl -LO https://github.com/apache/grails-forge/releases/download/$TAG/apache-grails-$VERSION-incubating-bin.zip
+          curl -LO https://github.com/apache/grails-forge/releases/download/$TAG/apache-grails-$VERSION-incubating-bin.zip.asc
+          svn add . --force
+          svn commit -m "Upload grails binary distribution for $VERSION" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+      - name: "Upload grails wrapper binary distribution"
+        run: |
+          TAG=${{ steps.release_version.outputs.tag_name }}
+          VERSION=${{ steps.release_version.outputs.version }}
+          cd dev-repo/grails/$VERSION/distribution
+          curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip
+          curl -LO https://github.com/apache/grails-core/releases/download/$TAG/apache-grails-wrapper-$VERSION-incubating-bin.zip.asc
+          svn add . --force
+          svn commit -m "Upload grails wrapper binary distribution for $VERSION" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
\ No newline at end of file