-
Notifications
You must be signed in to change notification settings - Fork 42
68 lines (66 loc) · 2.2 KB
/
build.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Java CI with Gradle
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.0.0
- name: Set up JDK
uses: actions/setup-java@v3.0.0
with:
distribution: adopt
java-version: 17
- name: Build LimboFilter
run: ./gradlew build
- name: Upload LimboFilter
uses: actions/upload-artifact@v3.0.0
with:
name: LimboFilter
path: "build/libs/limbofilter*.jar"
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
if: ${{ github.event_name == 'push' }}
with:
delete_release: true
tag_name: dev-build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Find git version
id: git-version
run: echo "id=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Find correct JAR
if: ${{ github.event_name == 'push' }}
id: find-jar
run: |
output="$(find build/libs/ ! -name "*-javadoc.jar" ! -name "*-sources.jar" -type f -printf "%f\n")"
echo "::set-output name=jarname::$output"
- name: Release the build
if: ${{ github.event_name == 'push' }}
uses: ncipollo/release-action@v1
with:
artifacts: build/libs/${{ steps.find-jar.outputs.jarname }}
body: ${{ join(github.event.commits.*.message, '\n') }}
prerelease: true
name: Dev-build ${{ steps.git-version.outputs.id }}
tag: dev-build
- name: Upload to Modrinth
if: ${{ github.event_name == 'push' }}
uses: RubixDev/modrinth-upload@v1.0.0
with:
token: ${{ secrets.MODRINTH_TOKEN }}
file_path: build/libs/${{ steps.find-jar.outputs.jarname }}
name: Dev-build ${{ steps.git-version.outputs.id }}
version: ${{ steps.git-version.outputs.id }}
changelog: ${{ join(github.event.commits.*.message, '\n') }}
relations: TZOteSf2:required
game_versions: 1.7.2
release_type: beta
loaders: velocity
featured: false
project_id: 6zIy0zBK