chore(deps): Update error-prone monorepo to v2.29.1 #652
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
# Making changes? https://github.com/nektos/act may help you test locally | |
name: Build and Publish | |
on: | |
push: | |
branches: "**" | |
tags-ignore: ["**"] | |
pull_request: | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" | |
cancel-in-progress: true | |
env: | |
RUNTIME_VERSION: 17 | |
jobs: | |
build: | |
# Only run on PRs if the source branch is on someone else's repo | |
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.repository.full_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v3 | |
- name: setup jdk ${{ env.RUNTIME_VERSION }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: ${{ env.RUNTIME_VERSION }} | |
- name: run gradle build | |
uses: gradle/gradle-build-action@v3 | |
with: | |
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/mc/') || github.event_name == 'pull_request' }} | |
arguments: build | |
- name: Archive test results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ runner.os }}-test-results | |
path: | | |
build/reports/ | |
*/build/reports/ | |
- name: Determine status | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then | |
echo "STATUS=snapshot" >> $GITHUB_ENV | |
else | |
echo "STATUS=release" >> $GITHUB_ENV | |
fi | |
- name: publish | |
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/mc/')) }} | |
run: ./gradlew publish | |
env: | |
ORG_GRADLE_PROJECT_pexUsername: ${{ secrets.REPO_USERNAME }} | |
ORG_GRADLE_PROJECT_pexPassword: ${{ secrets.REPO_PASSWORD }} | |
ORG_GRADLE_PROJECT_stellardriftUsername: ${{ secrets.STELLARDRIFT_REPO_USER }} | |
ORG_GRADLE_PROJECT_stellardriftPassword: ${{ secrets.STELLARDRIFT_REPO_PASSWORD }} | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} | |