Skip to content

chore: publish doesnt depend on test (#152) #91

chore: publish doesnt depend on test (#152)

chore: publish doesnt depend on test (#152) #91

Workflow file for this run

name: ci
on: [push]
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Java
id: setup-jre
uses: actions/setup-java@v1
with:
java-version: "11"
architecture: x64
- name: Compile
run: ./gradlew compileJava
test:
needs: [ compile ]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Java
id: setup-jre
uses: actions/setup-java@v1
with:
java-version: "11"
architecture: x64
- name: Test
run: ./gradlew test
env:
TEST_SQUARE_TOKEN: ${{ secrets.TEST_SQUARE_TOKEN }}
publish:
needs: [ compile ]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Java
id: setup-jre
uses: actions/setup-java@v1
with:
java-version: "11"
architecture: x64
- name: Publish to maven
run: |
./gradlew sonatypeCentralUpload -x test
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
MAVEN_SIGNATURE_KID: ""
MAVEN_SIGNATURE_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
MAVEN_SIGNATURE_PASSWORD: ${{ secrets.GPG_SECRET_PASSPHRASE }}