-
-
Notifications
You must be signed in to change notification settings - Fork 10
39 lines (37 loc) · 1.37 KB
/
release-uploader.yml
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
37
38
39
name: Prepare PlenBotLogUploader release
on:
push:
tags:
- 'Release-*'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
# This is a workaround for issue https://github.com/actions/virtual-environments/issues/1090,
# which causes to nuget restores to fail
- name: Clean NuGet cache
run: dotnet nuget locals all --clear
- name: Build
run: dotnet build PlenBotLogUploader.csproj -c Release
- name: Test
run: dotnet test PlenBotLogUploader.csproj --no-restore --verbosity normal
- name: Package PlenBotLogUploader (Windows)
run: dotnet publish PlenBotLogUploader.csproj -c Release -r win-x64 --self-contained=true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true -o artifacts/uploader/win64-sc/
- name: Prettify executable filenames
run: |
mv artifacts/uploader/win64-sc/PlenBotLogUploader.exe artifacts/uploader/win64-sc/PlenBotLogUploader.exe
- name: Prepare release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
artifacts/uploader/win64-sc/PlenBotLogUploader.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}