From 1bbcb9f3539fa634296af9c0669cc6f6f64e75e3 Mon Sep 17 00:00:00 2001 From: Emma Richardson <49138186+Emrichardsone@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:17:47 -0600 Subject: [PATCH 1/9] create github actions --- .github/ISSUE_TEMPLATE/bug_report.yaml | 60 +++++++ .github/ISSUE_TEMPLATE/config.yml | 10 ++ .github/ISSUE_TEMPLATE/new_feature.yaml | 14 ++ .github/ISSUE_TEMPLATE/other.yaml | 9 ++ .github/actions/post-release/Dockerfile | 10 ++ .github/actions/post-release/README.md | 11 ++ .github/actions/post-release/action.yml | 12 ++ .github/actions/post-release/entrypoint.sh | 89 ++++++++++ .../actions/post-release/increment_version.sh | 47 ++++++ .github/actions/pre-release/Dockerfile | 10 ++ .github/actions/pre-release/README.md | 11 ++ .github/actions/pre-release/action.yml | 12 ++ .github/actions/pre-release/entrypoint.sh | 43 +++++ .github/dependabot.yml | 45 ++++++ .github/release-drafter.yml | 41 +++++ .github/renovate.json | 70 ++++++++ .github/workflows/codeql.yml | 70 ++++++++ .github/workflows/gradle.yml | 86 ++++++++++ .github/workflows/groovy-joint-workflow.yml | 152 ++++++++++++++++++ .github/workflows/release-notes.yml | 53 ++++++ .github/workflows/release.yml | 129 +++++++++++++++ .github/workflows/retry-release.yml | 98 +++++++++++ .github/workflows/sdkman.yml | 36 +++++ 23 files changed, 1118 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/new_feature.yaml create mode 100644 .github/ISSUE_TEMPLATE/other.yaml create mode 100644 .github/actions/post-release/Dockerfile create mode 100644 .github/actions/post-release/README.md create mode 100644 .github/actions/post-release/action.yml create mode 100755 .github/actions/post-release/entrypoint.sh create mode 100755 .github/actions/post-release/increment_version.sh create mode 100644 .github/actions/pre-release/Dockerfile create mode 100644 .github/actions/pre-release/README.md create mode 100644 .github/actions/pre-release/action.yml create mode 100755 .github/actions/pre-release/entrypoint.sh create mode 100644 .github/dependabot.yml create mode 100644 .github/release-drafter.yml create mode 100644 .github/renovate.json create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/gradle.yml create mode 100644 .github/workflows/groovy-joint-workflow.yml create mode 100644 .github/workflows/release-notes.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/retry-release.yml create mode 100644 .github/workflows/sdkman.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..c082fa4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,60 @@ +name: Bug Report +description: File a bug report +body: + - type: markdown + attributes: + value: | + Thanks for reporting an issue for Grails framework, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed. + + NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/grails) or Slack (https://slack-signup.grails.org). DO NOT use the issue tracker to ask questions. + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + placeholder: Tell us what should happen + validations: + required: false + - type: textarea + attributes: + label: Actual Behaviour + description: A concise description of what you're experiencing. + placeholder: Tell us what happens instead + validations: + required: false + - type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: false + - type: textarea + attributes: + label: Environment Information + description: Environment information where the problem occurs. + placeholder: | + - Operating System: + - JDK Version: + validations: + required: false + - type: input + id: example + attributes: + label: Example Application + description: Example application link. + placeholder: | + Link to GitHub repository with an example that reproduces the issue + validations: + required: false + - type: input + id: version + attributes: + label: Version + description: Grails version + validations: + required: true + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..23a47c5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,10 @@ +contact_links: + - name: Grails Core Discussions + url: https://github.com/grails/grails-core/discussions + about: Ask questions about Grails® framework on Github + - name: Stack Overflow + url: https://stackoverflow.com/tags/grails + about: Ask questions on Stack Overflow + - name: Grails Slack + url: https://grails.slack.com/ + about: Chat with us on Grails Community Slack. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/new_feature.yaml b/.github/ISSUE_TEMPLATE/new_feature.yaml new file mode 100644 index 0000000..6093df0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new_feature.yaml @@ -0,0 +1,14 @@ +name: Feature request +description: Create a new feature request +body: + - type: markdown + attributes: + value: | + Please describe the feature you want for Grails® framework to implement, before that check if there is already an existing issue to add it. + - type: textarea + attributes: + label: Feature description + placeholder: Tell us more about the feature you would like for Grails® framework to have and what problem is it going to solve + validations: + required: true + diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml new file mode 100644 index 0000000..8e3b7e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -0,0 +1,9 @@ +name: Other +description: Something different +body: + - type: textarea + attributes: + label: Issue description + validations: + required: true + diff --git a/.github/actions/post-release/Dockerfile b/.github/actions/post-release/Dockerfile new file mode 100644 index 0000000..178e792 --- /dev/null +++ b/.github/actions/post-release/Dockerfile @@ -0,0 +1,10 @@ +# Container image that runs your code +FROM alpine:20231219 + +RUN apk add --no-cache curl jq git bash + +# Copies your code file from your action repository to the filesystem path `/` of the container +COPY *.sh / + +# Code file to execute when the docker container starts up (`entrypoint.sh`) +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/post-release/README.md b/.github/actions/post-release/README.md new file mode 100644 index 0000000..bed1d49 --- /dev/null +++ b/.github/actions/post-release/README.md @@ -0,0 +1,11 @@ +# Grails post-release action + +Performs some actions after doing a release + +## Example usage + +```yaml +uses: grails/post-release@master +with: + token: ${{ secrets.GITHUB_TOKEN }} +``` diff --git a/.github/actions/post-release/action.yml b/.github/actions/post-release/action.yml new file mode 100644 index 0000000..80485a2 --- /dev/null +++ b/.github/actions/post-release/action.yml @@ -0,0 +1,12 @@ +name: 'Grails post-release action' +description: 'Performs some actions after doing a release' +inputs: + token: + description: 'GitHub token to authenticate the requests' + required: true + default: ${{ github.token }} +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.token }} diff --git a/.github/actions/post-release/entrypoint.sh b/.github/actions/post-release/entrypoint.sh new file mode 100755 index 0000000..13b9db0 --- /dev/null +++ b/.github/actions/post-release/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +# $1 == GH_TOKEN + +if [ -z "$SNAPSHOT_SUFFIX" ]; then + SNAPSHOT_SUFFIX="-SNAPSHOT" +fi + +if [ -n "$MICRONAUT_BUILD_EMAIL" ]; then + GIT_USER_EMAIL=$MICRONAUT_BUILD_EMAIL +fi + +if [ -z "$GIT_USER_EMAIL" ]; then + GIT_USER_EMAIL="${GITHUB_ACTOR}@users.noreply.github.com" +fi + +if [ -z "$GIT_USER_NAME" ]; then + GIT_USER_NAME="grails-build" +fi + +echo -n "Determining release version: " +if [ -z "$RELEASE_VERSION" ]; then + release_version=${GITHUB_REF:11} +else + release_version=${RELEASE_VERSION} +fi +echo $release_version + +echo -n "Determining next version: " +next_version=`/increment_version.sh -p $release_version` +echo $next_version +echo "next_version=${next_version}" >> $GITHUB_OUTPUT + +echo "Configuring git" +git config --global user.email "$GIT_USER_EMAIL" +git config --global user.name "$GIT_USER_NAME" +git config --global --add safe.directory /github/workspace +git fetch + +echo -n "Determining target branch: " +if [ -z "$TARGET_BRANCH" ]; then + target_branch=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'` +else + target_branch=${TARGET_BRANCH} +fi +echo $target_branch +git checkout $target_branch + +echo -n "Retrieving current milestone number: " +milestone_number=`curl -s https://api.github.com/repos/$GITHUB_REPOSITORY/milestones | jq -c ".[] | select (.title == \"$release_version\") | .number" | sed -e 's/"//g'` +echo $milestone_number + +echo "Closing current milestone" +curl -s --request PATCH -H "Authorization: Bearer $1" -H "Content-Type: application/json" https://api.github.com/repos/$GITHUB_REPOSITORY/milestones/$milestone_number --data '{"state":"closed"}' + +echo "Getting issues closed" +issues_closed=`curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?milestone=$milestone_number&state=closed" | jq '.[] | "* \(.title) (#\(.number))"' | sed -e 's/^"\(.*\)"$/\1/g'` +echo $issues_closed + +echo -n "Getting release url: " +release_url=`cat $GITHUB_EVENT_PATH | jq '.release.url' | sed -e 's/^"\(.*\)"$/\1/g'` +echo $release_url + +echo -n "Getting release body: " +release_body=`cat $GITHUB_EVENT_PATH | jq '.release.body' | sed -e 's/^"\(.*\)"$/\1/g'` +echo $release_body + +echo -n "Updating release body: " +release_body="${release_body}\r\n${issues_closed}" +echo $release_body +curl -i --request PATCH -H "Authorization: Bearer $1" -H "Content-Type: application/json" $release_url --data "{\"body\": \"$release_body\"}" + +echo "Creating new milestone" +curl -s --request POST -H "Authorization: Bearer $1" -H "Content-Type: application/json" "https://api.github.com/repos/$GITHUB_REPOSITORY/milestones" --data "{\"title\": \"$next_version\"}" + +echo "Setting new snapshot version" +sed -i "s/^projectVersion.*$/projectVersion\=${next_version}$SNAPSHOT_SUFFIX/" gradle.properties +sed -i "s/assertEquals(\".*$/assertEquals(\"${next_version}$SNAPSHOT_SUFFIX\", GrailsUtil.getGrailsVersion());/" grails-core/src/test/groovy/grails/util/GrailsUtilTests.java +sed -n "/assertEquals(\".*/p" grails-core/src/test/groovy/grails/util/GrailsUtilTests.java +cat gradle.properties + +echo "Committing and pushing" +git add gradle.properties +git add grails-core/src/test/groovy/grails/util/GrailsUtilTests.java +git commit -m "Back to ${next_version}$SNAPSHOT_SUFFIX" +git push origin $target_branch + +echo "Setting release version back so that Maven Central sync can work" +sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties +cat gradle.properties diff --git a/.github/actions/post-release/increment_version.sh b/.github/actions/post-release/increment_version.sh new file mode 100755 index 0000000..0ee774b --- /dev/null +++ b/.github/actions/post-release/increment_version.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# Increment a version string using Semantic Versioning (SemVer) terminology. +# Source: https://github.com/fmahnke/shell-semver + +# Parse command line options. + +while getopts ":Mmp" Option +do + case $Option in + M ) major=true;; + m ) minor=true;; + p ) patch=true;; + esac +done + +shift $(($OPTIND - 1)) + +version=$1 + +# Build array from version string. + +a=( ${version//./ } ) + +# Increment version numbers as requested. + +if [ ! -z $major ] +then + ((a[0]++)) + a[1]=0 + a[2]=0 +fi + +if [ ! -z $minor ] +then + ((a[1]++)) + a[2]=0 +fi + +if [ ! -z $patch ] && ! [[ "${a[2]}" =~ M.*|RC.* ]] && ! [[ "${a[3]}" =~ ^M.*|^RC.* ]] +then + ((a[2]++)) +else + a[2]=0 +fi + +echo "${a[0]}.${a[1]}.${a[2]}" diff --git a/.github/actions/pre-release/Dockerfile b/.github/actions/pre-release/Dockerfile new file mode 100644 index 0000000..158073c --- /dev/null +++ b/.github/actions/pre-release/Dockerfile @@ -0,0 +1,10 @@ +# Container image that runs your code +FROM alpine:20231219 + +RUN apk add --no-cache curl jq git bash + +# Copies your code file from your action repository to the filesystem path `/` of the container +COPY entrypoint.sh /entrypoint.sh + +# Code file to execute when the docker container starts up (`entrypoint.sh`) +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/.github/actions/pre-release/README.md b/.github/actions/pre-release/README.md new file mode 100644 index 0000000..bc6e441 --- /dev/null +++ b/.github/actions/pre-release/README.md @@ -0,0 +1,11 @@ +# Grails pre-release action + +Performs some actions before doing a release + +## Example usage + +```yaml +uses: grails/grails-core/pre-release@master +with: + token: ${{ secrets.GITHUB_TOKEN }} +``` diff --git a/.github/actions/pre-release/action.yml b/.github/actions/pre-release/action.yml new file mode 100644 index 0000000..6e09e44 --- /dev/null +++ b/.github/actions/pre-release/action.yml @@ -0,0 +1,12 @@ +name: 'Grails pre-release action' +description: 'Performs some actions before doing a release' +inputs: + token: + description: 'GitHub token to authenticate the requests' + required: true + default: ${{ github.token }} +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.token }} diff --git a/.github/actions/pre-release/entrypoint.sh b/.github/actions/pre-release/entrypoint.sh new file mode 100755 index 0000000..efd44bd --- /dev/null +++ b/.github/actions/pre-release/entrypoint.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# $1 == GH_TOKEN + +echo -n "Determining release version: " +release_version=${GITHUB_REF:11} +echo $release_version + +if [ -n "$MICRONAUT_BUILD_EMAIL" ]; then + GIT_USER_EMAIL=$MICRONAUT_BUILD_EMAIL +fi + +if [ -z "$GIT_USER_NAME" ]; then + GIT_USER_NAME="grails-build" +fi + +echo "Configuring git" +git config --global user.email "$GIT_USER_EMAIL" +git config --global user.name "$GIT_USER_NAME" +git config --global --add safe.directory /github/workspace +git fetch + +echo -n "Determining target branch: " +target_branch=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'` +echo $target_branch +git checkout $target_branch + +echo "Setting release version in gradle.properties" +sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties +sed -i "s/assertEquals(\".*$/assertEquals(\"${release_version}\", GrailsUtil.getGrailsVersion());/" grails-core/src/test/groovy/grails/util/GrailsUtilTests.java +sed -n "/assertEquals(\".*/p" grails-core/src/test/groovy/grails/util/GrailsUtilTests.java +cat gradle.properties + +echo "Pushing release version and recreating v${release_version} tag" +git add gradle.properties +git add grails-core/src/test/groovy/grails/util/GrailsUtilTests.java +git commit -m "[skip ci] Release v${release_version}" +git tag -fa v${release_version} -m "Release v${release_version}" +git push origin v${release_version} --force + +echo "Closing again the release after updating the tag" +release_url=`cat $GITHUB_EVENT_PATH | jq '.release.url' | sed -e 's/^"\(.*\)"$/\1/g'` +echo $release_url +curl -s --request PATCH -H "Authorization: Bearer $1" -H "Content-Type: application/json" $release_url --data "{\"draft\": false}" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..78a5184 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,45 @@ +version: 2 +updates: + - package-ecosystem: gradle + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 0 + target-branch: 3.3.x + labels: + - "type: dependency upgrade" + - "relates-to: v3" + - package-ecosystem: gradle + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 0 + target-branch: 4.1.x + labels: + - "type: dependency upgrade" + - "relates-to: v4" + ignore: + - dependency-name: "*" + update-types: [ "version-update:semver-minor", "version-update:semver-major" ] + - package-ecosystem: gradle + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + target-branch: 5.4.x + labels: + - "type: dependency upgrade" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + - package-ecosystem: gradle + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + target-branch: 6.0.x + labels: + - "type: dependency upgrade" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-patch", "version-update:semver-minor"] diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..6c4938f --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,41 @@ +name-template: $RESOLVED_VERSION +tag-template: v$RESOLVED_VERSION +categories: + - title: ✨ Features + labels: + - "type: enhancement" + - "type: new feature" + - "type: major" + - title: 🐛 Bug Fixes/Improvements + labels: + - "type: improvement" + - "type: bug" + - "type: minor" + - title: 🛠 Dependency upgrades + labels: + - "type: dependency upgrade" + - "dependencies" + - title: ⚙️ Build/CI + labels: + - "type: ci" + - "type: build" +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +version-resolver: + major: + labels: + - 'type: major' + minor: + labels: + - 'type: minor' + patch: + labels: + - 'type: patch' + default: patch +template: | + ## What's Changed + + $CHANGES + + ## Contributors + + $CONTRIBUTORS diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..f50d856 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,70 @@ +{ + "extends": [ + "config:base", + "helpers:pinGitHubActionDigests" + ], + "labels": ["type: dependency upgrade"], + "packageRules": [ + { + "matchUpdateTypes": ["pin", "digest"], + "enabled": false + }, + { + "matchPackagePatterns": ["*"], + "allowedVersions": "!/SNAPSHOT$/" + }, + { + "matchPackagePatterns": [ + "^org\\.codehaus\\.groovy" + ], + "groupName": "groovy monorepo" + }, + { + "matchPackagePatterns": [ + "^org\\.apache\\.ant" + ], + "groupName": "apache-ant monorepo" + }, + { + "matchPackagePatterns": [ + "^org\\.apache\\.tomcat" + ], + "groupName": "apache-tomcat monorepo" + }, + { + "matchPackagePatterns": [ + "^io\\.micronaut" + ], + "groupName": "micronaut monorepo" + }, + { + "matchPackageNames": [ + "org.grails:grails-testing-support", + "org.grails:grails-web-testing-support", + "org.grails:grails-gorm-testing-support" + ], + "groupName": "grails-testing-support monorepo" + }, + { + "matchPackageNames": [ + "io.micronaut:micronaut-inject", + "io.micronaut:micronaut-runtime", + "io.micronaut:micronaut-inject-java", + "io.micronaut:micronaut-inject-groovy" + ], + "groupName": "Micronaut monorepo" + }, + { + "matchPackagePatterns": [ + "^io\\.micronaut\\.spring" + ], + "groupName": "Micronaut Spring monorepo" + }, + { + "matchPackagePatterns": [ + "^org\\.apache\\.maven\\.resolver" + ], + "groupName": "apache-maven-resolver monorepo" + } + ] +} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..4a0e5b9 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: + - '[4-9]+.[0-9]+.x' + pull_request: + # The branches below must be a subset of the branches above + branches: + - '[4-9]+.[0-9]+.x' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..8e00dbf --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,86 @@ +name: Java CI +on: + push: + branches: + - '[4-9]+.[0-9]+.x' + - '[3-9]+.[3-9]+.x' + pull_request: + branches: + - '[4-9]+.[0-9]+.x' + - '[3-9]+.[3-9]+.x' + workflow_dispatch: +jobs: + build: + permissions: + contents: read # to fetch code (actions/checkout) + runs-on: ubuntu-latest + strategy: + matrix: + java: ['11', '14'] + env: + WORKSPACE: ${{ github.workspace }} + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + with: + distribution: 'adopt' + java-version: ${{ matrix.java }} + - name: Run Build + id: build + uses: gradle/gradle-build-action@v2 + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + with: + arguments: build groovydoc + publish: + if: github.event_name == 'push' + needs: ["build"] + permissions: + contents: read # to fetch code (actions/checkout) + checks: write + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + - name: Set up JDK 11 + uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + with: + distribution: 'adopt' + java-version: 11 + - name: Publish Artifacts (repo.grails.org) + id: publish + uses: gradle/gradle-build-action@v2 + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} + ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} + with: + arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish + invoke-third-party-workflows: + if: github.event_name == 'push' + needs: ["build", "publish"] + permissions: + contents: read # to fetch code (actions/checkout) + runs-on: ubuntu-latest + steps: + - name: Extract branch name + id: extract_branch + run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT + - name: Create Snapshot Message for the Workflow Dispatch + id: dispatch_message + run: echo "value={\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT + - name: Invoke the Java CI workflow in Grails Functional Tests + uses: benc-uk/workflow-dispatch@v1.2 + with: + workflow: Java CI + repo: grails/grails-functional-tests + ref: ${{ steps.extract_branch.outputs.value }} + token: ${{ secrets.GH_TOKEN }} + inputs: ${{ steps.dispatch_message.outputs.value }} \ No newline at end of file diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml new file mode 100644 index 0000000..35dd681 --- /dev/null +++ b/.github/workflows/groovy-joint-workflow.yml @@ -0,0 +1,152 @@ +# 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 +# +# http://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: "Grails Joint Validation Build" +# GROOVY_2_5_X == Grails 4.0.x +# GROOVY_3_0_X == grails master +# Groovy master branch does not map to any due to changed package names. +on: + push: + branches: + - '[4-9]+.[0-9]+.x' + pull_request: + branches: + - '[4-9]+.[0-9]+.x' + workflow_dispatch: +permissions: + contents: read +env: + CI_GROOVY_VERSION: +jobs: + build_groovy: + strategy: + fail-fast: true + runs-on: ubuntu-latest + outputs: + groovyVersion: ${{ steps.groovy-version.outputs.value }} + steps: + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: '11.0.6' + - name: Cache local Maven repository & Groovy + uses: actions/cache@v3 + with: + path: | + ~/groovy + ~/.m2/repository + key: cache-local-groovy-maven-${{ github.sha }} + - name: Checkout Groovy 3_0_X (Grails 5 and later) + if: startsWith(github.ref, 'refs/heads/6.') || startsWith(github.base_ref, '6.') || startsWith(github.ref, 'refs/heads/5.') || startsWith(github.base_ref, '5.') + run: cd .. && git clone --depth 1 https://github.com/apache/groovy.git -b GROOVY_3_0_X --single-branch + - name: Set CI_GROOVY_VERSION for Grails + id: groovy-version + run: | + cd ../groovy + echo "CI_GROOVY_VERSION=$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]')" >> $GITHUB_ENV + echo "value=$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]')" >> $GITHUB_OUTPUT + - name: Prepare GE Set-up Configuration + id: ge_conf + run: | + echo "VALUE<> $GITHUB_OUTPUT + echo "plugins { " >> $GITHUB_OUTPUT + echo " id 'com.gradle.enterprise' version '3.15.1'" >> $GITHUB_OUTPUT + echo " id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.11.3'" >> $GITHUB_OUTPUT + echo "}" >> $GITHUB_OUTPUT + echo "" >> $GITHUB_OUTPUT + echo "gradleEnterprise {" >> $GITHUB_OUTPUT + echo " server = 'https://ge.grails.org'" >> $GITHUB_OUTPUT + echo " buildScan {" >> $GITHUB_OUTPUT + echo " publishAlways()" >> $GITHUB_OUTPUT + echo " publishIfAuthenticated()" >> $GITHUB_OUTPUT + echo " uploadInBackground = System.getenv('CI') == null" >> $GITHUB_OUTPUT + echo " capture {" >> $GITHUB_OUTPUT + echo " taskInputFiles = true" >> $GITHUB_OUTPUT + echo " }" >> $GITHUB_OUTPUT + echo " }" >> $GITHUB_OUTPUT + echo "}" >> $GITHUB_OUTPUT + echo "" >> $GITHUB_OUTPUT + echo "buildCache {" >> $GITHUB_OUTPUT + echo " local { enabled = System.getenv('CI') != 'true' }" >> $GITHUB_OUTPUT + echo " remote(HttpBuildCache) {" >> $GITHUB_OUTPUT + echo " push = System.getenv('CI') == 'true'" >> $GITHUB_OUTPUT + echo " enabled = true" >> $GITHUB_OUTPUT + echo " url = 'https://ge.grails.org/cache/'" >> $GITHUB_OUTPUT + echo " credentials {" >> $GITHUB_OUTPUT + echo " username = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER')" >> $GITHUB_OUTPUT + echo " password = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY')" >> $GITHUB_OUTPUT + echo " }" >> $GITHUB_OUTPUT + echo " }" >> $GITHUB_OUTPUT + echo "}" >> $GITHUB_OUTPUT + echo "" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + - name: Gradle Enterprise Set-up + run: | + cd ../groovy + # Delete exiting plugins and build-scan from settings.gradle file + sed -i '21,31d' settings.gradle + # Add Gradle Enterprise set-up related configuration after line no 20 in settings.gradle + echo "${{ steps.ge_conf.outputs.value}}" | sed -i -e "20r /dev/stdin" settings.gradle + - name: Build and install groovy (no docs) + uses: gradle/gradle-build-action@v2 + env: + GRADLE_SCANS_ACCEPT: yes + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + with: + build-root-directory: ../groovy + arguments: | + install + -x groovydoc + -x javadoc + -x javadocAll + -x groovydocAll + -x asciidoc + -x docGDK + build_grails: + needs: [build_groovy] + strategy: + fail-fast: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: '11' + - name: Cache local Maven repository & Groovy + uses: actions/cache@v3 + with: + path: | + ~/groovy + ~/.m2/repository + key: cache-local-groovy-maven-${{ github.sha }} + - name: Set CI_GROOVY_VERSION for Grails + run: | + echo "CI_GROOVY_VERSION=${{needs.build_groovy.outputs.groovyVersion}}" >> $GITHUB_ENV + - name: Build Grails + id: build_grails + uses: gradle/gradle-build-action@v2 + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + with: + arguments: | + build + -x groovydoc diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml new file mode 100644 index 0000000..a5a3e41 --- /dev/null +++ b/.github/workflows/release-notes.yml @@ -0,0 +1,53 @@ +name: Changelog +on: + issues: + types: [closed,reopened] + push: + branches: + - master + - '[4-9]+.[0-9]+.x' + - '[3-9]+.[3-9]+.x' + workflow_dispatch: + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + release_notes: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check if it has release drafter config file + id: check_release_drafter + run: | + has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false") + echo ::set-output name=has_release_drafter::${has_release_drafter} + - name: Extract branch name + id: extract_branch + run: echo ::set-output name=value::${GITHUB_REF:11} + # If it has release drafter: + - uses: release-drafter/release-drafter@v5 + if: steps.check_release_drafter.outputs.has_release_drafter == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + commitish: ${{ steps.extract_branch.outputs.value }} + # Otherwise: + - name: Export Gradle Properties + if: steps.check_release_drafter.outputs.has_release_drafter == 'false' + uses: micronaut-projects/github-actions/export-gradle-properties@master + - uses: micronaut-projects/github-actions/release-notes@master + if: steps.check_release_drafter.outputs.has_release_drafter == 'false' + id: release_notes + with: + token: ${{ secrets.GH_TOKEN }} + - uses: ncipollo/release-action@v1 + if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true' + with: + allowUpdates: true + commit: ${{ steps.release_notes.outputs.current_branch }} + draft: true + name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }} + tag: v${{ steps.release_notes.outputs.next_version }} + bodyFile: CHANGELOG.md + token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f5049c1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,129 @@ +name: Release +on: + release: + types: [published] +permissions: {} +jobs: + publish: + permissions: + contents: write # to create release + issues: write # to modify milestones + runs-on: ubuntu-latest + outputs: + release_version: ${{ steps.release_version.outputs.value }} + target_branch: ${{ steps.extract_branch.outputs.value }} + env: + GIT_USER_NAME: puneetbehl + GIT_USER_EMAIL: behlp@unityfoundation.io + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: '11' + - name: Set the current release version + id: release_version + run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT + - name: Run pre-release + uses: ./.github/actions/pre-release + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run Assemble + if: success() + id: assemble + uses: gradle/gradle-build-action@v2 + with: + arguments: assemble + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + - name: Upload Distribution + if: success() + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 + with: + name: grails-${{ steps.release_version.outputs.value }}.zip + path: build/distributions/grails-${{ steps.release_version.outputs.value }}.zip + - name: Upload artifacts to the Github release + if: success() + id: upload_artifact + uses: Roang-zero1/github-upload-release-artifacts-action@master + with: + args: build/distributions/grails-${{ steps.release_version.outputs.value }}.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Generate secring file + if: success() && false + env: + SECRING_FILE: ${{ secrets.SECRING_FILE }} + run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg + - name: Publish to Sonatype OSSRH + id: publish + if: success() && false + uses: gradle/gradle-build-action@v2 + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }} + SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} + SECRING_FILE: ${{ secrets.SECRING_FILE }} + with: + arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository + - name: Run post-release + if: success() + uses: ./.github/actions/post-release + with: + token: ${{ secrets.GITHUB_TOKEN }} + env: + SNAPSHOT_SUFFIX: -SNAPSHOT + docs: + needs: publish + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Prepare Input + id: prep_inputs + run: | + echo "value={\"grails_version\":\"$RELEASE_VERSION\"}" >> $GITHUB_OUTPUT + env: + RELEASE_VERSION: ${{ needs.publish.outputs.release_version }} + - name: Invoke grails-doc release workflow + uses: benc-uk/workflow-dispatch@v1.2 + with: + workflow: Release + repo: grails/grails-doc + ref: ${{ needs.publish.outputs.target_branch }} + token: ${{ secrets.GH_TOKEN }} + inputs: ${{ steps.prep_inputs.outputs.value }} + website: + needs: publish + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Prepare Input + id: prep_inputs + run: | + echo "value={\"grails_version\":\"$RELEASE_VERSION\"}" >> $GITHUB_OUTPUT + env: + RELEASE_VERSION: ${{ needs.publish.outputs.release_version }} + - name: Invoke grails-static-website release workflow + if: success() + id: grails_static_website + uses: benc-uk/workflow-dispatch@v1.2 + with: + workflow: Release + repo: grails/grails-static-website + ref: master + token: ${{ secrets.GH_TOKEN }} + inputs: ${{ steps.prep_inputs.outputs.value }} \ No newline at end of file diff --git a/.github/workflows/retry-release.yml b/.github/workflows/retry-release.yml new file mode 100644 index 0000000..897bcba --- /dev/null +++ b/.github/workflows/retry-release.yml @@ -0,0 +1,98 @@ +name: Retry Release +on: + workflow_dispatch: + inputs: + release: + description: The Grails Release (e.g. 5.0.3) + required: true + target_branch: + description: The Target Branch (e.g. 5.0.x) + required: true +permissions: {} +jobs: + release: + permissions: + contents: write # to create release + issues: read # to get closed issues + + runs-on: ubuntu-latest + env: + GIT_USER_NAME: puneetbehl + GIT_USER_EMAIL: behlp@unityfoundation.io + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: "v${{ github.event.inputs.release }}" + token: ${{ secrets.GH_TOKEN }} + - name: Set up JDK + uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + with: + distribution: 'adopt' + java-version: 11 + - name: Extract Target Branch + id: extract_branch + run: | + echo $TARGET_BRANCH + echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT + env: + TARGET_BRANCH: ${{ github.event.inputs.target_branch }} + - name: Set the current release version + id: release_version + run: echo "release_version=${VERSION}" >> $GITHUB_OUTPUT + env: + VERSION: ${{ github.event.inputs.release }} + - name: Run Assemble + id: assemble + uses: gradle/gradle-build-action@v2 + with: + arguments: assemble + env: + GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + - name: Upload artifacts to the Github release + id: upload_artifact + if: steps.assemble.outcome == 'success' + uses: Roang-zero1/github-upload-release-artifacts-action@v3 + with: + created_tag: v${{ github.event.inputs.release }} + args: build/distributions/grails-${{ steps.release_version.outputs.release_version }}.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create Message for the Grails Documentation Release + if: steps.assemble.outcome == 'success' + id: grails_docs_release_message + run: | + echo "value::{\"grails_version\":\"$RELEASE_VERSION\"}" >> $GITHUB_OUTPUT + env: + RELEASE_VERSION: ${{ steps.release_version.outputs.release_version }} + - name: Invoke grails-doc release workflow + if: steps.assemble.outcome == 'success' + id: grails_doc + uses: benc-uk/workflow-dispatch@v1.2 + with: + workflow: Release + repo: grails/grails-doc + ref: ${{ steps.extract_branch.outputs.value }} + token: ${{ secrets.GH_TOKEN }} + inputs: ${{ steps.grails_docs_release_message.outputs.value }} + - name: Invoke grails-static-website release workflow + if: steps.assemble.outcome == 'success' + id: grails_static_website + uses: benc-uk/workflow-dispatch@v1.2 + with: + workflow: Release + repo: grails/grails-static-website + ref: master + token: ${{ secrets.GH_TOKEN }} + inputs: ${{ steps.grails_docs_release_message.outputs.value }} + - name: Run post-release + if: steps.assemble.outcome == 'success' + uses: ./.github/actions/post-release + with: + token: ${{ secrets.GITHUB_TOKEN }} + env: + SNAPSHOT_SUFFIX: -SNAPSHOT + TARGET_BRANCH: ${{ github.event.inputs.target_branch }} + RELEASE_VERSION: ${{ github.event.inputs.release }} \ No newline at end of file diff --git a/.github/workflows/sdkman.yml b/.github/workflows/sdkman.yml new file mode 100644 index 0000000..f2b8c93 --- /dev/null +++ b/.github/workflows/sdkman.yml @@ -0,0 +1,36 @@ +name: Release to SDKMan +on: + workflow_dispatch: + inputs: + version: + description: 'Version to release' + required: true +jobs: + sdkman: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + with: + token: ${{ secrets.GH_TOKEN }} + ref: v${{ github.event.inputs.version }} + - name: Set up JDK + uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + with: + distribution: 'adopt' + java-version: '8' + - name: Grails SDK Minor Release + uses: gradle/gradle-build-action@v2 + with: + arguments: sdkMinorRelease + env: + GVM_SDKVENDOR_KEY: ${{ secrets.GVM_SDKVENDOR_KEY }} + GVM_SDKVENDOR_TOKEN: ${{ secrets.GVM_SDKVENDOR_TOKEN }} + - name: Set output + id: set_output + run: | + echo ::set-output name=release_version::$(cat $GITHUB_OUTPUT) + env: + GITHUB_OUTPUT: ${{ github.workspace }}/build/release_version From 383715a8786dfba14295875e17bf755a74fa21c0 Mon Sep 17 00:00:00 2001 From: Emma Richardson <49138186+Emrichardsone@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:14:32 -0600 Subject: [PATCH 2/9] remove grails discussion as contact link --- .DS_Store | Bin 0 -> 6148 bytes .github/ISSUE_TEMPLATE/config.yml | 2 -- 2 files changed, 2 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2ff39020bc120e7cda09dbf58f697b5559d20d1e GIT binary patch literal 6148 zcmeHK%SyvQ6rE|KO({YaiY^D-7LAXJ#Z8Fy2aM=Kr8cD0V9b;zHH%WnR)5Gp@q4^? zW+E257P0rj%(>5*%z?~UO`}ZJ20CCj?PlNEp3S!DS1xitLBpf-AXnLR`3SO*K%HhNt(!X1imW2$|EEOhyh}N7+7Hj z%%NbnR+s}?Ix#>DEN1}s2LTPyGgxX=TL*M_ea5(jhypskB@l%{&tRz$A|PCs0_sw3 zo)}!0gI}0D&tR!hmou(rhH=cy)#HV$*}*SVI^&*3>WKkjV3C2kHXS_wFW{G1`p91_ zA&VFw2L2fX-0B5A9~NcK)*s8mvsOTRfQEv3B`P4GFI)n^z Date: Mon, 12 Feb 2024 12:54:25 -0600 Subject: [PATCH 3/9] remove missed line from removing grails-core/discussion info --- .github/ISSUE_TEMPLATE/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index e959094..1a40780 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,4 @@ contact_links: - about: Ask questions about Grails® framework on Github - name: Stack Overflow url: https://stackoverflow.com/tags/grails about: Ask questions on Stack Overflow From dc19e5bc352dda99d4d21e759503f8c8e594d1ea Mon Sep 17 00:00:00 2001 From: Emma Richardson <49138186+Emrichardsone@users.noreply.github.com> Date: Wed, 21 Feb 2024 21:53:24 -0600 Subject: [PATCH 4/9] remove unnecessary workflows --- .github/actions/post-release/Dockerfile | 10 --- .github/actions/post-release/README.md | 11 --- .github/actions/post-release/action.yml | 12 --- .github/actions/post-release/entrypoint.sh | 89 ------------------- .../actions/post-release/increment_version.sh | 47 ---------- .github/actions/pre-release/Dockerfile | 10 --- .github/actions/pre-release/README.md | 11 --- .github/actions/pre-release/action.yml | 12 --- .github/actions/pre-release/entrypoint.sh | 43 --------- .github/workflows/retry-release.yml | 19 ---- 10 files changed, 264 deletions(-) delete mode 100644 .github/actions/post-release/Dockerfile delete mode 100644 .github/actions/post-release/README.md delete mode 100644 .github/actions/post-release/action.yml delete mode 100755 .github/actions/post-release/entrypoint.sh delete mode 100755 .github/actions/post-release/increment_version.sh delete mode 100644 .github/actions/pre-release/Dockerfile delete mode 100644 .github/actions/pre-release/README.md delete mode 100644 .github/actions/pre-release/action.yml delete mode 100755 .github/actions/pre-release/entrypoint.sh diff --git a/.github/actions/post-release/Dockerfile b/.github/actions/post-release/Dockerfile deleted file mode 100644 index 178e792..0000000 --- a/.github/actions/post-release/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -# Container image that runs your code -FROM alpine:20231219 - -RUN apk add --no-cache curl jq git bash - -# Copies your code file from your action repository to the filesystem path `/` of the container -COPY *.sh / - -# Code file to execute when the docker container starts up (`entrypoint.sh`) -ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/post-release/README.md b/.github/actions/post-release/README.md deleted file mode 100644 index bed1d49..0000000 --- a/.github/actions/post-release/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Grails post-release action - -Performs some actions after doing a release - -## Example usage - -```yaml -uses: grails/post-release@master -with: - token: ${{ secrets.GITHUB_TOKEN }} -``` diff --git a/.github/actions/post-release/action.yml b/.github/actions/post-release/action.yml deleted file mode 100644 index 80485a2..0000000 --- a/.github/actions/post-release/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Grails post-release action' -description: 'Performs some actions after doing a release' -inputs: - token: - description: 'GitHub token to authenticate the requests' - required: true - default: ${{ github.token }} -runs: - using: 'docker' - image: 'Dockerfile' - args: - - ${{ inputs.token }} diff --git a/.github/actions/post-release/entrypoint.sh b/.github/actions/post-release/entrypoint.sh deleted file mode 100755 index 13b9db0..0000000 --- a/.github/actions/post-release/entrypoint.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash -# $1 == GH_TOKEN - -if [ -z "$SNAPSHOT_SUFFIX" ]; then - SNAPSHOT_SUFFIX="-SNAPSHOT" -fi - -if [ -n "$MICRONAUT_BUILD_EMAIL" ]; then - GIT_USER_EMAIL=$MICRONAUT_BUILD_EMAIL -fi - -if [ -z "$GIT_USER_EMAIL" ]; then - GIT_USER_EMAIL="${GITHUB_ACTOR}@users.noreply.github.com" -fi - -if [ -z "$GIT_USER_NAME" ]; then - GIT_USER_NAME="grails-build" -fi - -echo -n "Determining release version: " -if [ -z "$RELEASE_VERSION" ]; then - release_version=${GITHUB_REF:11} -else - release_version=${RELEASE_VERSION} -fi -echo $release_version - -echo -n "Determining next version: " -next_version=`/increment_version.sh -p $release_version` -echo $next_version -echo "next_version=${next_version}" >> $GITHUB_OUTPUT - -echo "Configuring git" -git config --global user.email "$GIT_USER_EMAIL" -git config --global user.name "$GIT_USER_NAME" -git config --global --add safe.directory /github/workspace -git fetch - -echo -n "Determining target branch: " -if [ -z "$TARGET_BRANCH" ]; then - target_branch=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'` -else - target_branch=${TARGET_BRANCH} -fi -echo $target_branch -git checkout $target_branch - -echo -n "Retrieving current milestone number: " -milestone_number=`curl -s https://api.github.com/repos/$GITHUB_REPOSITORY/milestones | jq -c ".[] | select (.title == \"$release_version\") | .number" | sed -e 's/"//g'` -echo $milestone_number - -echo "Closing current milestone" -curl -s --request PATCH -H "Authorization: Bearer $1" -H "Content-Type: application/json" https://api.github.com/repos/$GITHUB_REPOSITORY/milestones/$milestone_number --data '{"state":"closed"}' - -echo "Getting issues closed" -issues_closed=`curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?milestone=$milestone_number&state=closed" | jq '.[] | "* \(.title) (#\(.number))"' | sed -e 's/^"\(.*\)"$/\1/g'` -echo $issues_closed - -echo -n "Getting release url: " -release_url=`cat $GITHUB_EVENT_PATH | jq '.release.url' | sed -e 's/^"\(.*\)"$/\1/g'` -echo $release_url - -echo -n "Getting release body: " -release_body=`cat $GITHUB_EVENT_PATH | jq '.release.body' | sed -e 's/^"\(.*\)"$/\1/g'` -echo $release_body - -echo -n "Updating release body: " -release_body="${release_body}\r\n${issues_closed}" -echo $release_body -curl -i --request PATCH -H "Authorization: Bearer $1" -H "Content-Type: application/json" $release_url --data "{\"body\": \"$release_body\"}" - -echo "Creating new milestone" -curl -s --request POST -H "Authorization: Bearer $1" -H "Content-Type: application/json" "https://api.github.com/repos/$GITHUB_REPOSITORY/milestones" --data "{\"title\": \"$next_version\"}" - -echo "Setting new snapshot version" -sed -i "s/^projectVersion.*$/projectVersion\=${next_version}$SNAPSHOT_SUFFIX/" gradle.properties -sed -i "s/assertEquals(\".*$/assertEquals(\"${next_version}$SNAPSHOT_SUFFIX\", GrailsUtil.getGrailsVersion());/" grails-core/src/test/groovy/grails/util/GrailsUtilTests.java -sed -n "/assertEquals(\".*/p" grails-core/src/test/groovy/grails/util/GrailsUtilTests.java -cat gradle.properties - -echo "Committing and pushing" -git add gradle.properties -git add grails-core/src/test/groovy/grails/util/GrailsUtilTests.java -git commit -m "Back to ${next_version}$SNAPSHOT_SUFFIX" -git push origin $target_branch - -echo "Setting release version back so that Maven Central sync can work" -sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties -cat gradle.properties diff --git a/.github/actions/post-release/increment_version.sh b/.github/actions/post-release/increment_version.sh deleted file mode 100755 index 0ee774b..0000000 --- a/.github/actions/post-release/increment_version.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# Increment a version string using Semantic Versioning (SemVer) terminology. -# Source: https://github.com/fmahnke/shell-semver - -# Parse command line options. - -while getopts ":Mmp" Option -do - case $Option in - M ) major=true;; - m ) minor=true;; - p ) patch=true;; - esac -done - -shift $(($OPTIND - 1)) - -version=$1 - -# Build array from version string. - -a=( ${version//./ } ) - -# Increment version numbers as requested. - -if [ ! -z $major ] -then - ((a[0]++)) - a[1]=0 - a[2]=0 -fi - -if [ ! -z $minor ] -then - ((a[1]++)) - a[2]=0 -fi - -if [ ! -z $patch ] && ! [[ "${a[2]}" =~ M.*|RC.* ]] && ! [[ "${a[3]}" =~ ^M.*|^RC.* ]] -then - ((a[2]++)) -else - a[2]=0 -fi - -echo "${a[0]}.${a[1]}.${a[2]}" diff --git a/.github/actions/pre-release/Dockerfile b/.github/actions/pre-release/Dockerfile deleted file mode 100644 index 158073c..0000000 --- a/.github/actions/pre-release/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -# Container image that runs your code -FROM alpine:20231219 - -RUN apk add --no-cache curl jq git bash - -# Copies your code file from your action repository to the filesystem path `/` of the container -COPY entrypoint.sh /entrypoint.sh - -# Code file to execute when the docker container starts up (`entrypoint.sh`) -ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/.github/actions/pre-release/README.md b/.github/actions/pre-release/README.md deleted file mode 100644 index bc6e441..0000000 --- a/.github/actions/pre-release/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Grails pre-release action - -Performs some actions before doing a release - -## Example usage - -```yaml -uses: grails/grails-core/pre-release@master -with: - token: ${{ secrets.GITHUB_TOKEN }} -``` diff --git a/.github/actions/pre-release/action.yml b/.github/actions/pre-release/action.yml deleted file mode 100644 index 6e09e44..0000000 --- a/.github/actions/pre-release/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Grails pre-release action' -description: 'Performs some actions before doing a release' -inputs: - token: - description: 'GitHub token to authenticate the requests' - required: true - default: ${{ github.token }} -runs: - using: 'docker' - image: 'Dockerfile' - args: - - ${{ inputs.token }} diff --git a/.github/actions/pre-release/entrypoint.sh b/.github/actions/pre-release/entrypoint.sh deleted file mode 100755 index efd44bd..0000000 --- a/.github/actions/pre-release/entrypoint.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# $1 == GH_TOKEN - -echo -n "Determining release version: " -release_version=${GITHUB_REF:11} -echo $release_version - -if [ -n "$MICRONAUT_BUILD_EMAIL" ]; then - GIT_USER_EMAIL=$MICRONAUT_BUILD_EMAIL -fi - -if [ -z "$GIT_USER_NAME" ]; then - GIT_USER_NAME="grails-build" -fi - -echo "Configuring git" -git config --global user.email "$GIT_USER_EMAIL" -git config --global user.name "$GIT_USER_NAME" -git config --global --add safe.directory /github/workspace -git fetch - -echo -n "Determining target branch: " -target_branch=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'` -echo $target_branch -git checkout $target_branch - -echo "Setting release version in gradle.properties" -sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties -sed -i "s/assertEquals(\".*$/assertEquals(\"${release_version}\", GrailsUtil.getGrailsVersion());/" grails-core/src/test/groovy/grails/util/GrailsUtilTests.java -sed -n "/assertEquals(\".*/p" grails-core/src/test/groovy/grails/util/GrailsUtilTests.java -cat gradle.properties - -echo "Pushing release version and recreating v${release_version} tag" -git add gradle.properties -git add grails-core/src/test/groovy/grails/util/GrailsUtilTests.java -git commit -m "[skip ci] Release v${release_version}" -git tag -fa v${release_version} -m "Release v${release_version}" -git push origin v${release_version} --force - -echo "Closing again the release after updating the tag" -release_url=`cat $GITHUB_EVENT_PATH | jq '.release.url' | sed -e 's/^"\(.*\)"$/\1/g'` -echo $release_url -curl -s --request PATCH -H "Authorization: Bearer $1" -H "Content-Type: application/json" $release_url --data "{\"draft\": false}" diff --git a/.github/workflows/retry-release.yml b/.github/workflows/retry-release.yml index 897bcba..17b97c6 100644 --- a/.github/workflows/retry-release.yml +++ b/.github/workflows/retry-release.yml @@ -77,22 +77,3 @@ jobs: ref: ${{ steps.extract_branch.outputs.value }} token: ${{ secrets.GH_TOKEN }} inputs: ${{ steps.grails_docs_release_message.outputs.value }} - - name: Invoke grails-static-website release workflow - if: steps.assemble.outcome == 'success' - id: grails_static_website - uses: benc-uk/workflow-dispatch@v1.2 - with: - workflow: Release - repo: grails/grails-static-website - ref: master - token: ${{ secrets.GH_TOKEN }} - inputs: ${{ steps.grails_docs_release_message.outputs.value }} - - name: Run post-release - if: steps.assemble.outcome == 'success' - uses: ./.github/actions/post-release - with: - token: ${{ secrets.GITHUB_TOKEN }} - env: - SNAPSHOT_SUFFIX: -SNAPSHOT - TARGET_BRANCH: ${{ github.event.inputs.target_branch }} - RELEASE_VERSION: ${{ github.event.inputs.release }} \ No newline at end of file From ccc4789ed909599b0bd2519e76172a7f24286b7c Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Fri, 23 Feb 2024 11:27:31 +0100 Subject: [PATCH 5/9] Remove some more workflows --- .github/workflows/groovy-joint-workflow.yml | 152 -------------------- .github/workflows/sdkman.yml | 36 ----- 2 files changed, 188 deletions(-) delete mode 100644 .github/workflows/groovy-joint-workflow.yml delete mode 100644 .github/workflows/sdkman.yml diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml deleted file mode 100644 index 35dd681..0000000 --- a/.github/workflows/groovy-joint-workflow.yml +++ /dev/null @@ -1,152 +0,0 @@ -# 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 -# -# http://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: "Grails Joint Validation Build" -# GROOVY_2_5_X == Grails 4.0.x -# GROOVY_3_0_X == grails master -# Groovy master branch does not map to any due to changed package names. -on: - push: - branches: - - '[4-9]+.[0-9]+.x' - pull_request: - branches: - - '[4-9]+.[0-9]+.x' - workflow_dispatch: -permissions: - contents: read -env: - CI_GROOVY_VERSION: -jobs: - build_groovy: - strategy: - fail-fast: true - runs-on: ubuntu-latest - outputs: - groovyVersion: ${{ steps.groovy-version.outputs.value }} - steps: - - name: Set up JDK - uses: actions/setup-java@v4 - with: - distribution: 'adopt' - java-version: '11.0.6' - - name: Cache local Maven repository & Groovy - uses: actions/cache@v3 - with: - path: | - ~/groovy - ~/.m2/repository - key: cache-local-groovy-maven-${{ github.sha }} - - name: Checkout Groovy 3_0_X (Grails 5 and later) - if: startsWith(github.ref, 'refs/heads/6.') || startsWith(github.base_ref, '6.') || startsWith(github.ref, 'refs/heads/5.') || startsWith(github.base_ref, '5.') - run: cd .. && git clone --depth 1 https://github.com/apache/groovy.git -b GROOVY_3_0_X --single-branch - - name: Set CI_GROOVY_VERSION for Grails - id: groovy-version - run: | - cd ../groovy - echo "CI_GROOVY_VERSION=$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]')" >> $GITHUB_ENV - echo "value=$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]')" >> $GITHUB_OUTPUT - - name: Prepare GE Set-up Configuration - id: ge_conf - run: | - echo "VALUE<> $GITHUB_OUTPUT - echo "plugins { " >> $GITHUB_OUTPUT - echo " id 'com.gradle.enterprise' version '3.15.1'" >> $GITHUB_OUTPUT - echo " id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.11.3'" >> $GITHUB_OUTPUT - echo "}" >> $GITHUB_OUTPUT - echo "" >> $GITHUB_OUTPUT - echo "gradleEnterprise {" >> $GITHUB_OUTPUT - echo " server = 'https://ge.grails.org'" >> $GITHUB_OUTPUT - echo " buildScan {" >> $GITHUB_OUTPUT - echo " publishAlways()" >> $GITHUB_OUTPUT - echo " publishIfAuthenticated()" >> $GITHUB_OUTPUT - echo " uploadInBackground = System.getenv('CI') == null" >> $GITHUB_OUTPUT - echo " capture {" >> $GITHUB_OUTPUT - echo " taskInputFiles = true" >> $GITHUB_OUTPUT - echo " }" >> $GITHUB_OUTPUT - echo " }" >> $GITHUB_OUTPUT - echo "}" >> $GITHUB_OUTPUT - echo "" >> $GITHUB_OUTPUT - echo "buildCache {" >> $GITHUB_OUTPUT - echo " local { enabled = System.getenv('CI') != 'true' }" >> $GITHUB_OUTPUT - echo " remote(HttpBuildCache) {" >> $GITHUB_OUTPUT - echo " push = System.getenv('CI') == 'true'" >> $GITHUB_OUTPUT - echo " enabled = true" >> $GITHUB_OUTPUT - echo " url = 'https://ge.grails.org/cache/'" >> $GITHUB_OUTPUT - echo " credentials {" >> $GITHUB_OUTPUT - echo " username = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER')" >> $GITHUB_OUTPUT - echo " password = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY')" >> $GITHUB_OUTPUT - echo " }" >> $GITHUB_OUTPUT - echo " }" >> $GITHUB_OUTPUT - echo "}" >> $GITHUB_OUTPUT - echo "" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - name: Gradle Enterprise Set-up - run: | - cd ../groovy - # Delete exiting plugins and build-scan from settings.gradle file - sed -i '21,31d' settings.gradle - # Add Gradle Enterprise set-up related configuration after line no 20 in settings.gradle - echo "${{ steps.ge_conf.outputs.value}}" | sed -i -e "20r /dev/stdin" settings.gradle - - name: Build and install groovy (no docs) - uses: gradle/gradle-build-action@v2 - env: - GRADLE_SCANS_ACCEPT: yes - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} - with: - build-root-directory: ../groovy - arguments: | - install - -x groovydoc - -x javadoc - -x javadocAll - -x groovydocAll - -x asciidoc - -x docGDK - build_grails: - needs: [build_groovy] - strategy: - fail-fast: true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK - uses: actions/setup-java@v4 - with: - distribution: 'adopt' - java-version: '11' - - name: Cache local Maven repository & Groovy - uses: actions/cache@v3 - with: - path: | - ~/groovy - ~/.m2/repository - key: cache-local-groovy-maven-${{ github.sha }} - - name: Set CI_GROOVY_VERSION for Grails - run: | - echo "CI_GROOVY_VERSION=${{needs.build_groovy.outputs.groovyVersion}}" >> $GITHUB_ENV - - name: Build Grails - id: build_grails - uses: gradle/gradle-build-action@v2 - env: - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} - GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} - with: - arguments: | - build - -x groovydoc diff --git a/.github/workflows/sdkman.yml b/.github/workflows/sdkman.yml deleted file mode 100644 index f2b8c93..0000000 --- a/.github/workflows/sdkman.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Release to SDKMan -on: - workflow_dispatch: - inputs: - version: - description: 'Version to release' - required: true -jobs: - sdkman: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - token: ${{ secrets.GH_TOKEN }} - ref: v${{ github.event.inputs.version }} - - name: Set up JDK - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 - with: - distribution: 'adopt' - java-version: '8' - - name: Grails SDK Minor Release - uses: gradle/gradle-build-action@v2 - with: - arguments: sdkMinorRelease - env: - GVM_SDKVENDOR_KEY: ${{ secrets.GVM_SDKVENDOR_KEY }} - GVM_SDKVENDOR_TOKEN: ${{ secrets.GVM_SDKVENDOR_TOKEN }} - - name: Set output - id: set_output - run: | - echo ::set-output name=release_version::$(cat $GITHUB_OUTPUT) - env: - GITHUB_OUTPUT: ${{ github.workspace }}/build/release_version From 050d68d5b4bdb49063b7d1dc00577ef72d67afcf Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Fri, 23 Feb 2024 11:29:13 +0100 Subject: [PATCH 6/9] Update workflows --- .github/workflows/codeql.yml | 4 ++-- .github/workflows/gradle.yml | 7 +++---- .github/workflows/release.yml | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4a0e5b9..9c6b707 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,11 +14,11 @@ name: "CodeQL" on: push: branches: - - '[4-9]+.[0-9]+.x' + - '[1-9]+.[0-9]+.x' pull_request: # The branches below must be a subset of the branches above branches: - - '[4-9]+.[0-9]+.x' + - '[1-9]+.[0-9]+.x' jobs: analyze: diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8e00dbf..7808daa 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -6,8 +6,7 @@ on: - '[3-9]+.[3-9]+.x' pull_request: branches: - - '[4-9]+.[0-9]+.x' - - '[3-9]+.[3-9]+.x' + - '[1-9]+.[0-9]+.x' workflow_dispatch: jobs: build: @@ -16,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['11', '14'] + java: ['8'] env: WORKSPACE: ${{ github.workspace }} steps: @@ -83,4 +82,4 @@ jobs: repo: grails/grails-functional-tests ref: ${{ steps.extract_branch.outputs.value }} token: ${{ secrets.GH_TOKEN }} - inputs: ${{ steps.dispatch_message.outputs.value }} \ No newline at end of file + inputs: ${{ steps.dispatch_message.outputs.value }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5049c1..bd14bac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'adopt' - java-version: '11' + java-version: '8' - name: Set the current release version id: release_version run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT From ba15cadfdd081bc1f5bb0c655ec5dd6e928cc68f Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Fri, 23 Feb 2024 11:47:18 +0100 Subject: [PATCH 7/9] Clean up --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 2ff39020bc120e7cda09dbf58f697b5559d20d1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%SyvQ6rE|KO({YaiY^D-7LAXJ#Z8Fy2aM=Kr8cD0V9b;zHH%WnR)5Gp@q4^? zW+E257P0rj%(>5*%z?~UO`}ZJ20CCj?PlNEp3S!DS1xitLBpf-AXnLR`3SO*K%HhNt(!X1imW2$|EEOhyh}N7+7Hj z%%NbnR+s}?Ix#>DEN1}s2LTPyGgxX=TL*M_ea5(jhypskB@l%{&tRz$A|PCs0_sw3 zo)}!0gI}0D&tR!hmou(rhH=cy)#HV$*}*SVI^&*3>WKkjV3C2kHXS_wFW{G1`p91_ zA&VFw2L2fX-0B5A9~NcK)*s8mvsOTRfQEv3B`P4GFI)n^z Date: Fri, 23 Feb 2024 17:26:14 +0100 Subject: [PATCH 8/9] Apply suggestions from code review --- .github/workflows/gradle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 7808daa..bc03e0c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: ${{ matrix.java }} @@ -47,10 +47,10 @@ jobs: with: token: ${{ secrets.GH_TOKEN }} - name: Set up JDK 11 - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + uses: actions/setup-java@v4 with: distribution: 'adopt' - java-version: 11 + java-version: 8 - name: Publish Artifacts (repo.grails.org) id: publish uses: gradle/gradle-build-action@v2 From 910ab98a2ec8fe13944db5c50d148119d5b5497e Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Fri, 23 Feb 2024 17:48:56 +0100 Subject: [PATCH 9/9] Apply suggestions from code review --- .github/workflows/release-notes.yml | 2 +- .github/workflows/release.yml | 2 -- .github/workflows/retry-release.yml | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index a5a3e41..24cd924 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -24,7 +24,7 @@ jobs: echo ::set-output name=has_release_drafter::${has_release_drafter} - name: Extract branch name id: extract_branch - run: echo ::set-output name=value::${GITHUB_REF:11} + run: echo "value=${GITHUB_REF:11}" >> $GITHUB_STATE # If it has release drafter: - uses: release-drafter/release-drafter@v5 if: steps.check_release_drafter.outputs.has_release_drafter == 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd14bac..c130d3a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,13 +57,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Generate secring file - if: success() && false env: SECRING_FILE: ${{ secrets.SECRING_FILE }} run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg - name: Publish to Sonatype OSSRH id: publish - if: success() && false uses: gradle/gradle-build-action@v2 env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} diff --git a/.github/workflows/retry-release.yml b/.github/workflows/retry-release.yml index 17b97c6..982964b 100644 --- a/.github/workflows/retry-release.yml +++ b/.github/workflows/retry-release.yml @@ -26,7 +26,7 @@ jobs: ref: "v${{ github.event.inputs.release }}" token: ${{ secrets.GH_TOKEN }} - name: Set up JDK - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: 11