[skip publish] Simplify release process #26
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: Pull request | |
on: | |
pull_request | |
jobs: | |
unit-test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: 'gradle' | |
- name: Change wrapper permission | |
run: chmod +x ./gradlew | |
- name: Test | |
run: ./gradlew clean allTests | |
publish: | |
name: Publish | |
if: ${{ !contains(github.event.pull_request.title, '[skip publish]') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: 'gradle' | |
- name: Change wrapper permission | |
run: chmod +x ./gradlew | |
- name: Publish Maven Snapshot | |
run: ./gradlew publishToSonatype | |
env: | |
OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} |