-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Turn off tests to get Snapshots publishing working
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
Showing
1 changed file
with
32 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Java CI | ||
name: "Java CI" | ||
on: | ||
push: | ||
branches: | ||
|
@@ -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 | ||
|
@@ -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 |