* GH-310 Add Hangar publishing workflow and configure build script for Hangar integration * Expand supported Paper versions in `gradle.properties` to include versions 1.17 through 1.21.11.
35 lines
989 B
YAML
35 lines
989 B
YAML
name: Publish to Hangar
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
if: (github.event_name == 'push' && !contains(github.event.head_commit.message, '[ci skip]')) || github.event_name == 'release'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
- name: Publish to Hangar
|
|
run: ./gradlew :eternalcombat-plugin:publishPluginPublicationToHangar
|
|
env:
|
|
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
|
|
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
CHANGELOG: ${{ github.event_name == 'release' && github.event.release.body || github.event.head_commit.message }}
|