Skip to content

Commit b925116

Browse files
committed
feat: windows build
1 parent 36fd7bb commit b925116

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
include:
21-
# - os: windows-latest
22-
# platform: windows-x64
23-
# artifact_name: opengit-${{ github.ref_name }}-windows-x64.zip
24-
# binary: target/release/opengit.exe
21+
- os: windows-latest
22+
platform: windows-x64
23+
artifact_name: opengit-${{ github.ref_name }}-windows-x64.zip
24+
binary: target/release/opengit.exe
2525

2626
- os: ubuntu-latest
2727
platform: linux-x64
@@ -39,9 +39,9 @@ jobs:
3939
- name: 编译 Release
4040
run: cargo build --release
4141

42-
# - name: 打包 Windows
43-
# if: matrix.os == 'windows-latest'
44-
# run: Compress-Archive -Path ${{ matrix.binary }} -DestinationPath ${{ matrix.artifact_name }}
42+
- name: 打包 Windows
43+
if: matrix.os == 'windows-latest'
44+
run: Compress-Archive -Path ${{ matrix.binary }} -DestinationPath ${{ matrix.artifact_name }}
4545

4646
- name: 打包 Linux
4747
if: matrix.os == 'ubuntu-latest'
@@ -65,6 +65,17 @@ jobs:
6565
uses: actions/download-artifact@v4
6666
with:
6767
path: artifacts/
68+
- name: 生成发布说明
69+
run: |
70+
cat << EOF > RELEASE_NOTES.md
71+
## 🎉 OpenGit ${{ github.ref_name }}
72+
73+
自动构建版本,支持一键打开 Git 仓库网页。
74+
75+
### 下载
76+
- Windows: opengit-${{ github.ref_name }}-windows-x64.zip
77+
- Linux: opengit-${{ github.ref_name }}-linux-x64.zip
78+
EOF
6879
6980
- name: 创建 Draft Release
7081
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)