1
+ name : CI
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ tags :
7
+ - " v*"
8
+ pull_request :
9
+ jobs :
10
+ generate-launchers :
11
+ runs-on : ${{ matrix.os }}
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ os : [ubuntu-latest, windows-latest, macos-latest]
16
+ steps :
17
+ - uses : actions/checkout@v2
18
+ with :
19
+ fetch-depth : 0
20
+ submodules : true
21
+ -
uses :
coursier/[email protected]
22
+ -
uses :
coursier/[email protected]
23
+ with :
24
+ jvm : temurin:17
25
+ - run : |
26
+ ./mill -i "java-class-name.writeNativeImageScript" generate.sh "" && \
27
+ ./generate.sh && \
28
+ ./mill -i "java-class-name.copyToArtifacts" artifacts/
29
+ if: runner.os != 'Windows'
30
+ - run : |
31
+ @call ./mill.bat -i "java-class-name.writeNativeImageScript" generate.bat ""
32
+ @call generate.bat
33
+ @call ./mill.bat -i "java-class-name.copyToArtifacts" artifacts/
34
+ shell: cmd
35
+ if: runner.os == 'Windows'
36
+ - name : Test
37
+ run : ./mill -i java-class-name-tests.test
38
+
39
+ with :
40
+ name : launcher-${{ matrix.os }}
41
+ path : artifacts/
42
+ if-no-files-found : error
43
+ retention-days : 1
44
+ - run : ./mill -i ci.upload artifacts/
45
+ if : github.event_name == 'push'
46
+ env :
47
+ UPLOAD_GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
+
49
+ generate-static-launcher :
50
+ runs-on : ubuntu-latest
51
+ steps :
52
+ - uses : actions/checkout@v2
53
+ with :
54
+ fetch-depth : 0
55
+ submodules : true
56
+ -
uses :
coursier/[email protected]
57
+ -
uses :
coursier/[email protected]
58
+ with :
59
+ jvm : temurin:17
60
+ - run : |
61
+ ./mill -i "java-class-name.static.writeNativeImageScript" generate.sh "" && \
62
+ ./generate.sh && \
63
+ ./mill -i "java-class-name.static.copyToArtifacts" artifacts/
64
+
65
+ with :
66
+ name : launcher-linux-static
67
+ path : artifacts/
68
+ if-no-files-found : error
69
+ retention-days : 1
70
+ - name : Test
71
+ run : ./mill -i java-class-name-tests.static.test
72
+ - run : ./mill -i ci.upload artifacts/
73
+ if : github.event_name == 'push'
74
+ env :
75
+ UPLOAD_GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76
+
77
+ generate-mostly-static-launcher :
78
+ runs-on : ubuntu-latest
79
+ steps :
80
+ - uses : actions/checkout@v2
81
+ with :
82
+ fetch-depth : 0
83
+ submodules : true
84
+ -
uses :
coursier/[email protected]
85
+ -
uses :
coursier/[email protected]
86
+ with :
87
+ jvm : temurin:17
88
+ - run : |
89
+ ./mill -i "java-class-name.mostly-static.writeNativeImageScript" generate.sh "" && \
90
+ ./generate.sh && \
91
+ ./mill -i "java-class-name.mostly-static.copyToArtifacts" artifacts/
92
+
93
+ with :
94
+ name : launcher-linux-mostly-static
95
+ path : artifacts/
96
+ if-no-files-found : error
97
+ retention-days : 1
98
+ - name : Test
99
+ run : ./mill -i java-class-name-tests.mostly-static.test
100
+ - run : ./mill -i ci.upload artifacts/
101
+ if : github.event_name == 'push'
102
+ env :
103
+ UPLOAD_GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104
+
105
+ publish :
106
+ needs : generate-launchers
107
+ runs-on : ubuntu-latest
108
+ steps :
109
+ - uses : actions/checkout@v2
110
+ with :
111
+ fetch-depth : 0
112
+ submodules : true
113
+ -
uses :
coursier/[email protected]
114
+ -
uses :
coursier/[email protected]
115
+ with :
116
+ jvm : temurin:17
117
+ - run : .github/scripts/gpg-setup.sh
118
+ env :
119
+ PGP_SECRET : ${{ secrets.PUBLISH_SECRET_KEY }}
120
+ - name : Publish
121
+ run : ./mill -i ci.publishSonatype __.publishArtifacts
122
+ env :
123
+ SONATYPE_USERNAME : ${{ secrets.PUBLISH_USER }}
124
+ SONATYPE_PASSWORD : ${{ secrets.PUBLISH_PASSWORD }}
125
+ PGP_PASSWORD : ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
0 commit comments