Skip to content

Commit 37cf244

Browse files
committed
update ci.yml
1 parent 4e860d7 commit 37cf244

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

.github/workflows/cd.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,58 @@ jobs:
1414
include:
1515
- os: ubuntu-latest
1616
file_ext: ""
17-
arch: linux-amd64
18-
# - os: windows-latest
19-
# file_ext: ".exe"
20-
# arch: win32-amd64
17+
arch: _linux-amd64
18+
- os: windows-latest
19+
file_ext: ".exe"
20+
arch: _win32-amd64
2121
# - os: macos-latest
2222
# file_ext: ""
2323
# arch: darwin-aarch64
2424
steps:
2525
- uses: actions/checkout@v4
2626
- uses: graalvm/setup-graalvm@v1
2727
with:
28-
java-version: '20'
28+
java-version: '17'
2929
distribution: 'graalvm'
3030
github-token: ${{ secrets.GITHUB_TOKEN }}
3131
native-image-job-reports: 'true'
3232
- name: Build
3333
run: |
3434
mvn -Pnative clean package
35+
- name: Windows rename
36+
shell: powershell
37+
if: ${{ matrix.os == 'windows-latest' }}
38+
run: |
39+
ren .\target\java-format-service${{ matrix.file_ext }} java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
3540
- name: Upx
36-
uses: svenstaro/upx-action@v2
41+
uses: crazy-max/ghaction-upx@v3
42+
if: ${{ matrix.os == 'ubuntu-latest' }}
3743
with:
44+
version: latest
3845
files: |
3946
target/java-format-service${{ matrix.file_ext }}
40-
args: -o target/java-format-service_${{ matrix.arch }}${{ matrix.file_ext }}
47+
args: -otarget/java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
48+
- name: Cert
49+
if: ${{ matrix.os == 'windows-latest' }}
50+
uses: dlemstra/code-sign-action@v1
51+
with:
52+
certificate: '${{ secrets.CERTIFICATE }}'
53+
password: '${{ secrets.CERTIFICATE_PASSWORD }}'
54+
folder: 'target'
55+
recursive: true
56+
files: |
57+
java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
58+
4159
- name: Publish
4260
uses: softprops/action-gh-release@v1
43-
# TODO: if any of the build step fails, the release should be deleted.
4461
with:
4562
files: |
46-
target/java-format-service_${{ matrix.arch }}${{ matrix.file_ext }}
63+
target/java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
4764
env:
4865
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4966
- name: Publish jar
5067
uses: softprops/action-gh-release@v1
5168
if: ${{ matrix.os == 'ubuntu-latest' }}
52-
# TODO: if any of the build step fails, the release should be deleted.
5369
with:
5470
files: |
5571
target/java-format-service.jar

0 commit comments

Comments
 (0)