Skip to content

Commit

Permalink
[skip ci] move skip check into its own job to prevent errors on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Dec 20, 2024
1 parent fc14d26 commit 2c744e8
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ on:
- '[3-9]+.[3-9]+.x'
workflow_dispatch:
jobs:
build:
skip_check:
runs-on: ubuntu-latest
outputs:
found_skip_publish: ${{ steps.check_prevent_property.outputs.value }}
permissions:
contents: read # to fetch code (actions/checkout)
strategy:
matrix:
java: [17, 21, 23]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
contents: read
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v4
Expand All @@ -31,6 +27,18 @@ jobs:
else
echo "value=false" >> $GITHUB_OUTPUT
fi
build:
needs: skip_check
permissions:
contents: read # to fetch code (actions/checkout)
strategy:
matrix:
java: [17, 21, 23]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
Expand All @@ -47,7 +55,7 @@ jobs:
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
run: ./gradlew build assemble groovydoc
publish:
if: github.event_name == 'push' && needs.build.outputs.found_skip_publish != 'true'
if: github.event_name == 'push' && needs.skip_check.outputs.found_skip_publish != 'true'
needs: build
permissions:
contents: read # limit to read access
Expand Down Expand Up @@ -76,7 +84,7 @@ jobs:
-Dorg.gradle.internal.publish.checksums.insecure=true
publish
docs:
if: github.event_name == 'push' && needs.build.outputs.found_skip_publish != 'true'
if: github.event_name == 'push' && needs.skip_check.outputs.found_skip_publish != 'true'
needs: publish
runs-on: ubuntu-latest
permissions:
Expand Down

0 comments on commit 2c744e8

Please sign in to comment.