Skip to content

传送带

传送带 #66

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ "dev/1.20.1" ]
pull_request:
branches: [ "dev/1.20.1" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Make gradlew excutable
run: chmod +x ./gradlew
- name: Execute Gradle build
run: ./gradlew build
- name: Load properties from gradle.properties
id: loadProperties
run: |
export MOD_VERSION=$(grep -oP 'mod_version=\K.*' gradle.properties)
echo "::set-output name=mod_version::$MOD_VERSION"
- name: Upload JAR file
uses: actions/upload-artifact@v2
with:
name: MC-Mindustry
path: build/libs/$({{ steps.loadProperties.outputs.mod_version }}).jar