Prepare publish of com.gradleup.shadow #19
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
# Always test on the latest version and all LTS. | |
java: [ 11, 17, 21, 22 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-home-cache-cleanup: true | |
validate-wrappers: true | |
- run: ./gradlew build | |
publish-snapshot: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.repository == 'GradleUp/shadow' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- uses: gradle/actions/setup-gradle@v3 | |
with: | |
cache-read-only: true | |
- run: ./gradlew publish | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USER }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} |