Merge branch '1.19/dev' into 1.19/main #282
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: | |
push: | |
branches: | |
- "1.19/main" | |
- "1.19/dev" | |
workflow_dispatch: | |
inputs: | |
norelease: | |
description: 'Do not publish' | |
required: true | |
default: 'false' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: | | |
!contains(github.event.head_commit.message, '[ci skip]') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 30 # Gets the last 30 commits so the changelog might work | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: gradle | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Build and Publish with Gradle | |
uses: gradle/gradle-build-action@v2 | |
env: | |
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }} | |
FTB_MAVEN_TOKEN: ${{ secrets.FTB_MAVEN_TOKEN }} | |
SAPS_TOKEN: ${{ secrets.SAPS_TOKEN }} | |
with: | |
arguments: build -x test publish --stacktrace --no-daemon | |
- name: Release to CurseForge | |
uses: gradle/gradle-build-action@v2 | |
if: | | |
contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[norelease]') && github.event.inputs.norelease != 'true' | |
env: | |
GIT_COMMIT: ${{ github.event.after }} | |
GIT_PREVIOUS_COMMIT: ${{ github.event.before }} | |
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }} | |
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
with: | |
arguments: build -x test publishUnified --stacktrace --no-daemon |