9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-29 19:59:18 +00:00
Files
DivineMC/.github/workflows/publish-api.yml
2025-04-27 14:06:50 +03:00

45 lines
1.2 KiB
YAML

name: Publish API
on:
push:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Configure Git and Gradle
run: |
git config --global user.email "no-reply@github.com" && git config --global user.name "Github Actions"
chmod +x gradlew
- name: Apply patches
run: |
PARALLELISM=$(($(nproc) * 2))
./gradlew applyAllPatches --stacktrace --parallel --max-workers=$PARALLELISM --build-cache --no-daemon
- name: Build
run: ./gradlew build -x test
- name: Publish API
continue-on-error: true
run: |
./gradlew :divinemc-api:publish
./gradlew publishDevBundlePublicationToDivinemcRepository -PpublishDevBundle=true
env:
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
REPO_PASSWORD: ${{ secrets.REPO_SECRET }}