mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-22 11:55:12 +01:00
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: Publish Release
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
inputs:
|
|
logLevel:
|
|
description: 'Log Level'
|
|
required: false
|
|
default: 'warning'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
if: "contains(github.event.commits[0].message, '[build]')"
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Validate Gradle Wrapper
|
|
uses: gradle/actions/wrapper-validation@v3
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: 21
|
|
check-latest: true
|
|
|
|
- name: Gradle Properties Import.
|
|
id: properties
|
|
shell: bash
|
|
run: cat gradle.properties >> $GITHUB_ENV
|
|
|
|
- name: Make gradlew executable
|
|
run: chmod +x ./gradlew
|
|
|
|
- name: Assemble
|
|
run:
|
|
./gradlew assemble --stacktrace
|
|
|
|
- name: Publish
|
|
env:
|
|
HANGAR_KEY: ${{ secrets.HANGAR_KEY }}
|
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
|
COMMIT_MESSAGE: ${{ join(github.event.commits.*.message, '<br>* ') }}
|
|
run: ./gradlew modrinth publishAllPublicationsToHangar --stacktrace
|
|
|
|
- name: Maven Publish
|
|
env:
|
|
gradle_username: ${{ secrets.GRADLE_USERNAME }}
|
|
gradle_password: ${{ secrets.GRADLE_PASSWORD }}
|
|
run: ./gradlew publish --stacktrace |