Skip to content

Add release and snapshot workflows on CI #134

Add release and snapshot workflows on CI

Add release and snapshot workflows on CI #134

Workflow file for this run

name: Main
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- name: Execute Gradle build
run: ./gradlew build
publish-snapshot:
needs: build
runs-on: ubuntu-latest
if: github.repository_owner == 'melix' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true
# Disable CC due to https://github.com/gradle/gradle/issues/22779
- run: ./gradlew publish --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}