generated from FabricMC/fabric-example-mod
-
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (59 loc) · 1.79 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
69
70
71
72
73
74
name: build
on: [push,workflow_dispatch]
permissions:
contents: write
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest,]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/[email protected]
with:
fetch-depth: 0
fetch-tags: true
- name: validate gradle wrapper
uses: gradle/[email protected]
- name: setup jdk 21
uses: actions/[email protected]
with:
java-version: 21
distribution: 'temurin'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
gradle-distribution-sha-256-sum-warning: false
- name: build
run: ./gradlew build
- name: Move the jar
run: ./gradlew move-jar
- name: Generate version file
run: ./gradlew generate-version-file
- name: Read mod version
id: mod_version
uses: juliangruber/read-file-action@cc341ded5e6547edbdf30bf7b4138a940433641b
with:
path: ./temp/version/version-info
- run: echo ${{ steps.mod_version.outputs.content }}
- name: capture build artifacts
uses: actions/[email protected]
with:
name: Stone Craft ${{ steps.mod_version.outputs.content }} beta
path: artifacts
- name: Set latest tag
uses: EndBug/latest-tag@latest
- name: Remove assets
uses: RawDiamondMC/delete-release-assets@v1
with:
tag: latest
deleteOnlyFromDrafts: false
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./artifacts/*
prerelease: true
tag_name: latest