-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 937 Bytes
/
WindowsBuild.yml
File metadata and controls
36 lines (31 loc) · 937 Bytes
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
name: Build Windows Runtime
on:
push:
branches: [ main ]
workflow_dispatch: # 可选:被主流程调用
jobs:
win-runtime:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Build Windows runtime image
shell: pwsh
run: |
$env:RELEASE_TOKEN="${{ secrets.RELEASE_TOKEN }}"
./gradlew runtime # 只生成 win 镜像
- name: 7z Compact
run: |
cd build/image
7z a -mx=9 javaows-win.zip ./*
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ github.run_number }}
name: v${{ github.run_number }}
files: build/image/javaows-win.zip
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}