Add release Action

This commit is contained in:
Natlinux81
2023-06-28 00:21:05 +02:00
parent b47f7d75f9
commit f82803392d
2 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
name: "Deploy MathColoringGame"
on:
push:
tags:
- "math-coloring-game/v*"
env:
PROJECT_PATH: MathColoringGame/MathColoringGame.csproj
jobs:
deploy:
run-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- run: dotnet restore ${{ env.PROJECT_PATH}}
- run: dotnet build ${{ env.PROJECT_PATH}} -c Release --no-restore
- run: dotnet publish ${{ env.PROJECT_PATH}} -c Release --self-contained -r win-x64 -p:PublishSingleFile=true --no-build
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: $ {{github.ref}}
- use: csexton/release-asset-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN}}
pattern: MathColoringGame/bin/Release/net6.0-windows/win-x64/publish/*.exe
release-url: ${{ steps.create_release.outputs.upload_url }}

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract> <IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>