2727 - name : Build
2828 run : make build
2929
30+ - name : Upload artifact
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : target
34+ path : target
35+ retention-days : 7
36+
3037 docker-jvm :
3138 name : Docker [JVM]
3239 runs-on : ubuntu-latest
@@ -50,15 +57,11 @@ jobs:
5057 - name : Set up Docker Buildx
5158 uses : docker/setup-buildx-action@v3
5259
53- - name : Set up JDK
54- uses : actions/setup-java @v4
60+ - name : Download artifact
61+ uses : actions/download-artifact @v4
5562 with :
56- java-version : ' 21'
57- distribution : corretto
58- cache : maven
59-
60- - name : Build
61- run : make build
63+ name : target
64+ path : target
6265
6366 - name : Build and push [edge]
6467 run : docker buildx build --push -t ghcr.io/javabin/submittheforce:edge -f src/main/docker/Dockerfile.jvm --platform linux/amd64,linux/arm64 .
9295 with :
9396 name : uber-jar
9497 path : target/submit-runner.jar
98+ retention-days : 7
9599
96100 - name : Upload asset
97101 uses : k15g/action-github-asset-upload@edge
@@ -119,27 +123,24 @@ jobs:
119123 - name : Set up Docker Buildx
120124 uses : docker/setup-buildx-action@v3
121125
122- - name : Set up JDK
123- uses : actions/setup-java @v4
126+ - name : Download artifact
127+ uses : actions/download-artifact @v4
124128 with :
125- java-version : ' 21'
126- distribution : corretto
127- cache : maven
128-
129- - name : Build
130- run : make build
129+ name : target
130+ path : target
131131
132132 - name : Build native
133133 run : make native
134134
135135 - name : Rename file
136- run : mv target/submit-runner target/submit-runner-linux-amd64
136+ run : mv target/submit-runner target/submit-runner-linux-x86_64
137137
138138 - name : Upload artifact
139139 uses : actions/upload-artifact@v4
140140 with :
141141 name : native-amd64
142142 path : target/submit-runner-linux-amd64
143+ retention-days : 7
143144
144145 - name : Upload asset
145146 uses : k15g/action-github-asset-upload@edge
@@ -149,3 +150,47 @@ jobs:
149150 file : target/submit-runner-linux-amd64
150151 name : submit-runner-linux-amd64
151152 label : Native [amd64]
153+
154+ native-arm64 :
155+ name : Native [arm64]
156+ runs-on : ubuntu-24.04-arm
157+ needs :
158+ - build
159+
160+ steps :
161+ - name : Checkout
162+ uses : actions/checkout@v4
163+
164+ - name : Set up QEMU
165+ uses : docker/setup-qemu-action@v3
166+
167+ - name : Set up Docker Buildx
168+ uses : docker/setup-buildx-action@v3
169+
170+ - name : Download artifact
171+ uses : actions/download-artifact@v4
172+ with :
173+ name : target
174+ path : target
175+
176+ - name : Build native
177+ run : make native
178+
179+ - name : Rename file
180+ run : mv target/submit-runner target/submit-runner-linux-aarch64
181+
182+ - name : Upload artifact
183+ uses : actions/upload-artifact@v4
184+ with :
185+ name : native-arm64
186+ path : target/submit-runner-linux-aarch64
187+ retention-days : 7
188+
189+ - name : Upload asset
190+ uses : k15g/action-github-asset-upload@edge
191+ if : startsWith(github.ref, 'refs/tags/v')
192+ with :
193+ token : ${{ secrets.GITHUB_TOKEN }}
194+ file : target/submit-runner-linux-aarch64
195+ name : submit-runner-linux-aarch64
196+ label : Native [arm64]
0 commit comments