This repository was archived by the owner on Mar 13, 2025. It is now read-only.
ci: adjust for new repository url #2195
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
name: "Java CI" | |
on: | |
push: | |
branches: | |
- '[7-9]+.[0-9]+.x' | |
pull_request: | |
branches: | |
- '[7-9]+.[0-9]+.x' | |
workflow_dispatch: | |
env: | |
GIT_USER_NAME: grails-build | |
GIT_USER_EMAIL: [email protected] | |
permissions: | |
packages: read | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
env: | |
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "βοΈ Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: liberica | |
- name: "π Setup Gradle" | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | |
- name: "π¨ Run Build" | |
id: build | |
env: | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew build --continue | |
publish: | |
if: github.event_name == 'push' | |
needs: 'build' | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "βοΈ Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: liberica | |
- name: "π Setup Gradle" | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | |
- name: "π€ Publish Snapshot to repo.grails.org" | |
env: | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
GRADLE_PUBLISH_RELEASE: 'false' | |
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }} | |
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }} | |
run: ./gradlew publish --no-build-cache | |
- name: "π¨ Build Docs" | |
env: | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew docs:docs | |
- name: "π Determine docs target repository" | |
run: | | |
if [ "${{ github.repository }}" = "grails/grails-data-hibernate5" ]; then | |
DOCS_TARGET_REPOSITORY="grails/grails-data-mapping" | |
else | |
DOCS_TARGET_REPOSITORY="${{ github.repository }}" | |
fi | |
echo "DOCS_TARGET_REPOSITORY=${DOCS_TARGET_REPOSITORY}" >> $GITHUB_ENV | |
echo "Target Repository: ${DOCS_TARGET_REPOSITORY}" | |
- name: "π€ Publish to Github Pages" | |
uses: grails/github-pages-deploy-action@v3 | |
env: | |
BRANCH: gh-pages | |
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }} | |
COMMIT_NAME: ${{ env.GIT_USER_NAME }} | |
DOC_FOLDER: gh-pages | |
DOC_SUB_FOLDER: hibernate | |
FOLDER: docs/build/docs | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
TARGET_REPOSITORY: ${{ env.DOCS_TARGET_REPOSITORY }} |