Skip to content

Commit 0d6594d

Browse files
committed
Add GitHub Actions workflow for releasing executable
1 parent ae7f020 commit 0d6594d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release Executable
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-release:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: 6.0.x
23+
24+
- name: Publish win-x64 single-file executable
25+
shell: pwsh
26+
run: |
27+
dotnet restore DataversePluginWrapper.csproj
28+
dotnet publish DataversePluginWrapper.csproj -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=false -o publish/win-x64
29+
30+
- name: Package release zip
31+
shell: pwsh
32+
run: |
33+
Compress-Archive -Path publish/win-x64/* -DestinationPath publish/DataversePluginWrapper-win-x64.zip
34+
35+
- name: Upload asset to GitHub Release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
files: publish/DataversePluginWrapper-win-x64.zip

0 commit comments

Comments
 (0)