-
Notifications
You must be signed in to change notification settings - Fork 12
122 lines (119 loc) · 3.42 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Publish
on: [workflow_dispatch] # Manual trigger
jobs:
prep:
runs-on: ubuntu-latest
name: 'Work'
outputs:
did_tasks: ${{ steps.tasks.conclusion }}
did_license: ${{ steps.license.conclusion }}
did_test: ${{ steps.test.conclusion }}
did_javadoc: ${{ steps.javadoc.conclusion }}
did_build: ${{ steps.build.conclusion }}
did_publish: ${{ steps.publish.conclusion }}
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
distribution: 'adopt-hotspot'
java-version: '21'
- id: tasks
name: 'Setup'
run: './gradlew tasks'
- id: 'license'
name: 'Check License'
run: './gradlew checkLicense'
- id: 'test'
name: 'Test'
run: './gradlew test'
- id: 'javadoc'
name: 'Javadoc'
run: './gradlew javadoc'
- id: 'build'
name: 'Build'
run: './gradlew build'
- id: 'publish'
name: 'Build'
run: './gradlew publish uploadJavadoc'
env:
UPLOAD_MAVEN_URL: ${{ secrets.UPLOAD_MAVEN_URL }}
UPLOAD_PASSWORD: ${{ secrets.UPLOAD_PASSWORD }}
UPLOAD_USERNAME: ${{ secrets.UPLOAD_USERNAME }}
output_tasks:
name: 'Check Buildscript'
runs-on: ubuntu-latest
needs: prep
if: always()
steps:
- name: 'Check Tasks'
run: |
echo "${{ needs.prep.outputs.did_tasks }}"
if [[ ${{ needs.prep.outputs.did_tasks }} != "success" ]]; then
echo "Look at the 'Work' job to see what went wrong!"
exit 1
fi
output_license:
name: 'Check License'
runs-on: ubuntu-latest
needs: [prep, output_tasks]
if: always()
steps:
- name: 'Check License'
run: |
echo "${{ needs.prep.outputs.did_license }}"
if [[ ${{ needs.prep.outputs.did_license }} != "success" ]]; then
echo "Look at the 'Work' job to see what went wrong!"
exit 1
fi
output_test:
name: 'Run Tests'
runs-on: ubuntu-latest
needs: [prep, output_license]
if: always()
steps:
- name: 'Check Test'
run: |
echo "${{ needs.prep.outputs.did_test }}"
if [[ ${{ needs.prep.outputs.did_test }} != "success" ]]; then
echo "Look at the 'Work' job to see what went wrong!"
exit 1
fi
output_javadoc:
name: 'Generate Javadoc'
runs-on: ubuntu-latest
needs: [prep, output_test]
if: always()
steps:
- name: 'Check Javadocs'
run: |
echo "${{ needs.prep.outputs.did_javadoc }}"
if [[ ${{ needs.prep.outputs.did_javadoc }} != "success" ]]; then
echo "Look at the 'Work' job to see what went wrong!"
exit 1
fi
output_build:
name: 'Build Jars'
runs-on: ubuntu-latest
needs: [prep, output_javadoc]
if: always()
steps:
- name: 'Check Build'
run: |
echo "${{ needs.prep.outputs.did_build }}"
if [[ ${{ needs.prep.outputs.did_build }} != "success" ]]; then
echo "Look at the 'Work' job to see what went wrong!"
exit 1
fi
output_publish:
name: 'Publish Jars'
runs-on: ubuntu-latest
needs: [prep, output_build]
if: always()
steps:
- name: 'Check Publishing'
run: |
echo "${{ needs.prep.outputs.did_publish }}"
if [[ ${{ needs.prep.outputs.did_publish }} != "success" ]]; then
echo "Look at the 'Work' job to see what went wrong!"
exit 1
fi