File tree Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Original file line number Diff line number Diff line change 30
30
- name : Set build version
31
31
if : ${{ runner.os != 'Windows' }}
32
32
run : |
33
- sed -i "s/pre_release = alpha/pre_release = beta/g" gradle.properties
33
+ sed -i "s/pre_release= alpha/pre_release= beta/g" gradle.properties
34
34
- name : capture build artifacts
35
- if : ${{ runner.os == 'Linux'}}
35
+ if : ${{ runner.os == 'Linux' && matrix.java == '17' }}
36
36
uses : actions/upload-artifact@v2
37
37
with :
38
38
name : Artifacts
Original file line number Diff line number Diff line change
1
+ name : Publish Release
2
+ on :
3
+ release :
4
+ types :
5
+ - published
6
+ jobs :
7
+ build :
8
+ strategy :
9
+ matrix :
10
+ java : [ 17 ]
11
+ os : [ ubuntu-20.04 ]
12
+ branch : [ 1.16.x, 1.17.x, 1.18.x ]
13
+ runs-on : ${{ matrix.os }}
14
+ steps :
15
+ - name : checkout repository
16
+ uses : actions/checkout@v2
17
+ with :
18
+ ref : ${{ matrix.branch }}
19
+ - name : validate gradle wrapper
20
+ uses : gradle/wrapper-validation-action@v1
21
+ - name : setup jdk ${{ matrix.java }}
22
+ uses : actions/setup-java@v1
23
+ with :
24
+ java-version : ${{ matrix.java }}
25
+ - name : Set build version
26
+ if : ${{ runner.os != 'Windows' }}
27
+ run : |
28
+ sed -i "s/pre_release=alpha/pre_release=/g" gradle.properties
29
+ - name : make gradle wrapper executable
30
+ if : ${{ runner.os != 'Windows' }}
31
+ run : chmod +x ./gradlew
32
+ - name : build
33
+ run : ./gradlew build
34
+ - name : Find correct JAR
35
+ id : findjar
36
+ run : |
37
+ output="$(find build/libs/ ! -name "*-dev.jar" ! -name "*-sources.jar" -type f -printf "%f\n")"
38
+ echo "::set-output name=jarname::$output"
39
+ - name : Upload assets to GitHub
40
+
41
+ if : ${{ runner.os == 'Linux' && matrix.java == '17' }}
42
+ with :
43
+ files : build/libs/${{ steps.findjar.outputs.jarname }}
44
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments