From 15981f82d6ea6e2e1899466cd14ae36230354032 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Sat, 20 Jul 2024 23:37:34 +0200 Subject: [PATCH] Added build-config --- .github/workflows/release.yml | 55 +++++++++++++++++++ HPPH.SkiaSharp/HPPH.SkiaSharp.csproj | 6 +- .../HPPH.System.Drawing.csproj | 6 +- HPPH/HPPH.csproj | 6 +- 4 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ef54a72 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,55 @@ +name: release + +on: + workflow_dispatch: + inputs: + version: + description: 'version' + required: true + type: string + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Restore dependencies + run: dotnet restore HPPH + + - name: Build + run: dotnet build HPPH --no-restore --configuration Release /p:Version=${{ github.event.inputs.version }} + + - name: Test + run: dotnet test HPPH --no-build --verbosity normal --configuration Release + + - name: Upload Nuget Build Artifact + uses: actions/upload-artifact@v4.3.1 + with: + name: HPPH-Nuget + path: HPPH\bin\Release\*.nupkg + if-no-files-found: error + + - name: List files + run: tree + + - name: Release + uses: softprops/action-gh-release@v2.0.4 + with: + tag_name: ${{ github.event.inputs.version }} + generate_release_notes: true + files: HPPH/bin/Release/net8.0/*.dll + + - name: Nuget Push + id: nuget_push + run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json + diff --git a/HPPH.SkiaSharp/HPPH.SkiaSharp.csproj b/HPPH.SkiaSharp/HPPH.SkiaSharp.csproj index dc03760..deb82ef 100644 --- a/HPPH.SkiaSharp/HPPH.SkiaSharp.csproj +++ b/HPPH.SkiaSharp/HPPH.SkiaSharp.csproj @@ -30,9 +30,9 @@ - 1.0.0 - 1.0.0 - 1.0.0 + 0.0.1 + 0.0.1 + 0.0.1 ..\bin\ true diff --git a/HPPH.System.Drawing/HPPH.System.Drawing.csproj b/HPPH.System.Drawing/HPPH.System.Drawing.csproj index 6b284fe..10cea48 100644 --- a/HPPH.System.Drawing/HPPH.System.Drawing.csproj +++ b/HPPH.System.Drawing/HPPH.System.Drawing.csproj @@ -30,9 +30,9 @@ - 1.0.0 - 1.0.0 - 1.0.0 + 0.0.1 + 0.0.1 + 0.0.1 ..\bin\ true diff --git a/HPPH/HPPH.csproj b/HPPH/HPPH.csproj index b805d42..3ae3dc7 100644 --- a/HPPH/HPPH.csproj +++ b/HPPH/HPPH.csproj @@ -32,9 +32,9 @@ - 1.0.0 - 1.0.0 - 1.0.0 + 0.0.1 + 0.0.1 + 0.0.1 ..\bin\ true