CrazyAuctions/.github/workflows/build_release.yml
2023-02-05 23:13:47 -05:00

51 lines
1.3 KiB
YAML

name: Release Build
on:
push:
branches:
- main
- dev
workflow_dispatch:
inputs:
logLevel:
description: 'Log Level'
required: false
default: 'warning'
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
steps:
- uses: actions/checkout@main
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@main
with:
distribution: temurin
java-version: 17
- name: Gradle Properties Import.
shell: bash
run: cat gradle.properties >> $GITHUB_ENV
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Shadow Jar
run: ./gradlew shadowJar --stacktrace
- name: Modrinth Publish
run: ./gradlew modrinth --stacktrace
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
- name: Repo Publish
run: ./gradlew publish --stacktrace
env:
REPOSITORY_USERNAME: ${{ secrets.CRAZYCREW_USERNAME }}
REPOSITORY_PASSWORD: ${{ secrets.CRAZYCREW_PASSWORD }}
- name: Update Notification
run: |
./gradlew releaseBuild --stacktrace
./gradlew releaseWebhook --stacktrace
env:
DISCORD_WEBHOOK: ${{ secrets.CRAZYCREW_WEBHOOK }}