Skip to content

Commit 687e28c

Browse files
committed
docs: update README for v12, add publish CI workflow
- Update README to reflect Avalonia 12, net10.0, new features - Add manual publish workflow (workflow_dispatch) - Builds win-x64 and linux-x64 single-file packages - Package name: GeneralUpdate.Tools_YYYYMMDDHHmmss_<rid>.zip
1 parent b3b63f5 commit 687e28c

2 files changed

Lines changed: 96 additions & 430 deletions

File tree

.github/workflows/publish.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest]
11+
include:
12+
- os: ubuntu-latest
13+
rid: linux-x64
14+
ext: ""
15+
- os: windows-latest
16+
rid: win-x64
17+
ext: ".exe"
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: 10.0.x
26+
27+
- name: Publish
28+
run: >
29+
dotnet publish src/GeneralUpdate.Tools.csproj
30+
-c Release
31+
-r ${{ matrix.rid }}
32+
-p:PublishSingleFile=true
33+
-p:PublishTrimmed=true
34+
--self-contained
35+
-o publish/${{ matrix.rid }}
36+
37+
- name: Get timestamp
38+
id: ts
39+
shell: bash
40+
run: echo "timestamp=$(date -u '+%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
41+
42+
- name: Package (Windows)
43+
if: matrix.os == 'windows-latest'
44+
shell: pwsh
45+
run: |
46+
Compress-Archive -Path publish/${{ matrix.rid }}/GeneralUpdate.Tools.exe -DestinationPath GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_win-x64.zip
47+
48+
- name: Package (Linux)
49+
if: matrix.os == 'ubuntu-latest'
50+
run: |
51+
cd publish/${{ matrix.rid }}
52+
zip ../../GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_linux-x64.zip GeneralUpdate.Tools
53+
54+
- name: Upload artifact
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_${{ matrix.rid }}
58+
path: GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_${{ matrix.rid }}.zip

0 commit comments

Comments
 (0)