From e67752565132e1b8d8904ac07d33f5a21b3ac343 Mon Sep 17 00:00:00 2001 From: nevermore Date: Sat, 14 Dec 2024 21:13:05 +0800 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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..4762def --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Pack Nuget + +on: + push: + branches: [ "action/release" ] + pull_request: + branches: [ "action/release" ] + +jobs: + nuget: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - name: Build the Project + run: dotnet build ./src/Lemon.ModuleNavigation.Avaloniaui --configuration Release + + - name: Pack Nuget + run: dotnet pack ./src/Lemon.ModuleNavigation -o ./nugets + + - name: Pack Nuget + run: dotnet pack ./src/Lemon.ModuleNavigation.Avaloniaui -o ./nugets + + - name: Publish NuGet package + run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.3.1 + with: + name: nugets + path: ./nugets