-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (76 loc) · 2.03 KB
/
publish.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
name: Publish Jars
permissions:
contents: write
on:
workflow_dispatch:
inputs:
release_name:
description: 'The name of the release'
required: true
type: string
release_body:
description: 'The description of the release'
required: true
type: string
jobs:
build_latest:
runs-on: ubuntu-latest
steps:
- name: checkout sources
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Test
run: |
chmod +x ./gradlew
./gradlew runMainTest
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
name: normal
path: build/libs/*.jar
compression-level: 1
build_5:
runs-on: ubuntu-latest
steps:
- name: checkout sources
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
- name: setup gradle
uses: gradle/actions/setup-gradle@v4
- name: run test
run: |
chmod +x ./gradlew
./gradlew java5Jar
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
name: java-5
path: build/libs/*.jar
compression-level: 1
publish:
runs-on: ubuntu-latest
steps:
- name: download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
merge-multiple: true
- name: create release
uses: softprops/action-gh-release@v2
with:
name: ${{ inputs.release_name }}
body: ${{ inputs.release_body }}
files: $( ls -1 )
tag_name: $( ls -AU artifacts | head -1 )