Skip to content

Commit

Permalink
ci: Fix and cleanup Github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
matrei committed Jan 7, 2025
1 parent bd9c6ea commit 541b161
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 25 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['17']
java: ['17', '21']
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
Expand All @@ -36,35 +36,28 @@ jobs:
- name: "🏃 Run Tests"
if: github.event_name == 'pull_request'
id: tests
run: ./gradlew check
run: ./gradlew check --continue
- name: "🔨 Build project"
if: github.event_name == 'push'
id: build
run: ./gradlew build
- name: "📄 Publish Test Report"
if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure'
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/test/TEST-*.xml'
run: ./gradlew build --continue
- name: "📤 Publish Snapshot"
if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '17'
if: github.event_name == 'push' && steps.build.outcome == 'success' && matrix.java == '17'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: publish
run: ./gradlew publish
- name: "✍️ Generate Documentation"
id: docs
if: success() && github.event_name == 'push' && matrix.java == '17'
run: ./gradlew docs
- name: "📤 Publish to Github Pages"
if: steps.publish.outcome == 'success' && github.event_name == 'push' && matrix.java == '17'
if: github.event_name == 'push' && steps.publish.outcome == 'success' && matrix.java == '17'
uses: grails/github-pages-deploy-action@grails
env:
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: grails-build@users.noreply.github.com
COMMIT_NAME: grails-build
COMMIT_NAME: grails-build
DOC_FOLDER: gh-pages
FOLDER: build/docs
GH_TOKEN: ${{ secrets.GH_TOKEN }}
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ jobs:
release:
runs-on: ubuntu-latest
env:
GIT_USER_NAME: 'grails-build'
GIT_USER_EMAIL: 'grails-build@users.noreply.github.com'
GIT_USER_NAME: grails-build
GIT_USER_EMAIL: grails-build@users.noreply.github.com
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'
java-version: 17
distribution: liberica
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
Expand Down Expand Up @@ -55,13 +55,13 @@ jobs:
uses: grails/github-pages-deploy-action@grails
env:
BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ env.GIT_USER_NAME }}
DOC_FOLDER: gh-pages
FOLDER: docs/build/docs
GH_TOKEN: ${{ secrets.GH_TOKEN }}
TARGET_REPOSITORY: ${{ github.repository }}
VERSION: ${{ steps.release_version.outputs.release_version }}
- name: "⚙️ Run post-release"
if: steps.publish.outcome == 'success' && steps.docs.outcome == 'success' && success()
Expand Down

0 comments on commit 541b161

Please sign in to comment.