-
Notifications
You must be signed in to change notification settings - Fork 36
106 lines (87 loc) · 3.11 KB
/
prerelease.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: 1.21.3 PreRelease Build and Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+\+1.21.3.pre'
jobs:
build-java-and-linux-amd64:
# uses ubuntu 22
# but we need to retain 20 compat for main releases
# should be increased for future mc version channels as we can't support it forver
# 32gb memory needed for instrumenting
runs-on: ubicloud-standard-8
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '23'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Echo Versions and Paths
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
native-image --version
- name: Elevate wrapper permissions
run: chmod +x ./gradlew
- name: Export Tag
run: |
echo "RELEASE_TAG=${{ github.ref_name }}" >> "$GITHUB_ENV"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
- name: Build ZenithProxy Java
run: ./gradlew jarBuild
- name: Upload Java Artifact
uses: actions/upload-artifact@v4
with:
name: ZenithProxy-java
path: build/libs/ZenithProxy.jar
- name: Enable GraalVM Profile Instrumenting
run: |
echo "GRAALVM_PGO_INSTRUMENT=true" >> "$GITHUB_ENV"
- name: Build ZenithProxy Linux Native
run: ./gradlew nativeCompile
- name: Elevate binary permissions
run: chmod +x build/native/nativeCompile/*
- name: Zip Binary And Libs
run: zip -j ZenithProxy.zip build/native/nativeCompile/*
- name: Upload Linux Artifact
uses: actions/upload-artifact@v4
with:
name: ZenithProxy-linux
path: ZenithProxy.zip
release-artifacts:
needs:
- build-java-and-linux-amd64
runs-on: ubuntu-latest
steps:
- name: Download job artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: artifacts/
- name: Get Release Tags
run: |
j_tag="$(sed 's/\+/\+java./' <<< ${{ github.ref_name }})"
echo "JAVA_TAG=$j_tag" >> "$GITHUB_ENV"
l_tag="$(sed 's/\+/\+linux./' <<< ${{ github.ref_name }})"
echo "LINUX_TAG=$l_tag" >> "$GITHUB_ENV"
- name: Publish Java Artifact
uses: ncipollo/release-action@v1
with:
tag: ${{ env.JAVA_TAG }}
artifacts: "artifacts/*.jar"
prerelease: true
body: "File upload not for users. **Use the Launcher:** https://github.com/rfresh2/ZenithProxy/releases/tag/launcher-v3"
- name: Publish Linux Artifact
uses: ncipollo/release-action@v1
with:
tag: ${{ env.LINUX_TAG }}
artifacts: "artifacts/ZenithProxy.zip"
prerelease: true
body: "File upload not for users. **Use the Launcher:** https://github.com/rfresh2/ZenithProxy/releases/tag/launcher-v3"