Skip to content

Update gradle.yml

Update gradle.yml #34

Workflow file for this run

name: Mod Compile Checks
on:
push:
branches: [ "1.20.1" ]
pull_request:
branches: [ "1.20.1" ]
jobs:
release-jar-snapshot:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: M
run: ls
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Read Properties
id: readproperties
uses: BrycensRanch/read-properties-action@v1
with:
file: gradle.properties
all: true
- name: Truncate Git SHA
id: truncated
uses: actions/github-script@v7.0.1
with:
script: |
const sha = context.sha.substring(1,6)
core.setOutput('sha', sha)
core.setOutput('versionStr', '${{steps.readproperties.outputs.mod_version}}.alpha.' + sha)
- name: Run Data Generation (Server, Client)
id: datagen
env:
MOD_VERSION: ${{ steps.truncated.outputs.versionStr }}
JAVA_OPTS: -Dlog4j.configuration=log4j.properties
run: ./gradlew runData
- name: Build JAR file
env:
MOD_VERSION: ${{ steps.truncated.outputs.versionStr }}
JAVA_OPTS: -Dlog4j.configuration=log4j.properties
run: ./gradlew build
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: build/libs/*
tag_name: snapshot-${{ steps.truncated.outputs.sha }}
name: ${{steps.readproperties.outputs.mod_name}} ${{ steps.truncated.outputs.versionStr }}
draft: false