Skip to content

Commit

Permalink
ci: Turn off tests to get Snapshots publishing working
Browse files Browse the repository at this point in the history
This commit temporarily turns off tests in CI so Snapshots
will be published for Grails 7 by adding `-x test` to the
Gradle `build` command.

It also generally cleans up `gradle.yml` a bit.
  • Loading branch information
matrei committed Aug 16, 2024
1 parent 08dbba7 commit 0ca42bc
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI
name: "Java CI"
on:
push:
branches:
Expand All @@ -11,23 +11,24 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: readw
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: "📥 Checkout the repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: 'temurin'
java-version: '17'
- name: Run Build
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
- name: "🔨 Run Build"
id: build
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: build
- name: Upload Distribution
if: success() && matrix.java == '11'
run: ./gradlew build -x test
- name: "📤 Upload Artifact"
if: success()
uses: actions/upload-artifact@v4
with:
name: grails-gsp-SNAPSHOT.zip
Expand All @@ -39,47 +40,49 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: "📥 Checkout the repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
- name: Publish to repo.grails.org
uses: gradle/gradle-build-action@v3
distribution: 'temurin'
java-version: '17'
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
- name: "📤 Publish Snapshot to repo.grails.org"
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
with:
arguments: publish
run: ./gradlew publish
docs:
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: "📥 Checkout the repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: 'temurin'
java-version: '17'
- name: Build Docs
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
- name: "🔨 Build Docs"
id: docs
uses: gradle/gradle-build-action@v3
with:
arguments: docs
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Publish to Github Pages
run: ./gradlew docs
- name: "📤 Publish docs to Github Pages"
if: steps.docs.outcome == 'success'
uses: grails/github-pages-deploy-action@v2
env:
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs
COMMIT_EMAIL: [email protected]
COMMIT_NAME: Puneet Behl
COMMIT_EMAIL: [email protected]
COMMIT_NAME: grails-build

0 comments on commit 0ca42bc

Please sign in to comment.