-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (46 loc) · 1.51 KB
/
commitTest.yml
File metadata and controls
50 lines (46 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build Mod
on: [push, pull_request]
jobs:
buildJar:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up PATH
run: |
echo "${ANDROID_HOME}/build-tools/34.0.0" >> $GITHUB_PATH
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Build mod jar
run: ./gradlew deploy
- name: Upload built jar file
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}
path: build/libs/${{ github.event.repository.name }}.jar
- name: Read version from file
id: read_version_from_file
run: |
echo "ver=$(sed -nE 's/^version: \s*(\S*)\s*$/v\1/p' mod.hjson)" >> $GITHUB_OUTPUT
- name: Automatic release (Current version)
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.read_version_from_file.outputs.ver }}"
prerelease: false
title: "${{ steps.read_version_from_file.outputs.ver }} (Mindustry v8)"
files: |
./build/libs/*.jar
- name: Automatic release (Latest)
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Latest Build (Mindustry v8)"
files: |
./build/libs/*.jar