From bc9f84357801b723a5048ad8613be4f9d0dac55a Mon Sep 17 00:00:00 2001 From: LoveDoLove Date: Fri, 12 Jul 2024 20:27:46 +0800 Subject: [PATCH] Auto Release Actions - Added Auto Release With Using Github Actions - Upgrade to .Net 4.8 FrameWork --- .github/workflows/dotnet.yml | 38 ++++++++++++++++++++++++++ FirewallCleanup/App.config | 6 ++-- FirewallCleanup/FirewallCleanup.csproj | 3 +- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..e748fd6 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,38 @@ +name: .NET Framework Build on Windows + +on: + workflow_dispatch: + push: + branches: + - master + +permissions: + contents: write + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup MSBuild path + uses: microsoft/setup-msbuild@v2 + + - name: Restore NuGet packages + run: msbuild /t:restore + + - name: Build project + run: msbuild /p:Configuration=Release /p:TargetFrameworkVersion=v4.8 /p:RestorePackagesConfig=true + + - name: Set ENV date + id: date + run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')" + + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + **/bin/Release/** + token: ${{ github.token }} + tag_name: ${{ steps.date.outputs.date }} diff --git a/FirewallCleanup/App.config b/FirewallCleanup/App.config index 731f6de..4bfa005 100644 --- a/FirewallCleanup/App.config +++ b/FirewallCleanup/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/FirewallCleanup/FirewallCleanup.csproj b/FirewallCleanup/FirewallCleanup.csproj index dfe11a3..aa57639 100644 --- a/FirewallCleanup/FirewallCleanup.csproj +++ b/FirewallCleanup/FirewallCleanup.csproj @@ -8,7 +8,7 @@ Exe FirewallCleanup FirewallCleanup - v4.6.1 + v4.8 512 true true @@ -27,6 +27,7 @@ false false true + AnyCPU