From 6ffb6045db675500991ac84907b0af6d5ddfca6c Mon Sep 17 00:00:00 2001 From: Gilles TOURREAU Date: Wed, 5 Jun 2024 00:37:48 +0200 Subject: [PATCH] Add the release pipeline --- .github/workflows/github-actions-release.yml | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/github-actions-release.yml diff --git a/.github/workflows/github-actions-release.yml b/.github/workflows/github-actions-release.yml new file mode 100644 index 0000000..c9184c3 --- /dev/null +++ b/.github/workflows/github-actions-release.yml @@ -0,0 +1,36 @@ +name: Release + +on: + workflow_dispatch: + inputs: + VersionPrefix: + type: string + description: The version of the library + required: true + default: 1.0.0 + VersionSuffix: + type: string + description: The version suffix of the library (for example rc.1) + +run-name: ${{ inputs.VersionPrefix }}-${{ inputs.VersionSuffix }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup .NET 8.x + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.x' + + - name: Build + run: dotnet pack + --property:Configuration=Release + --property:VersionPrefix=${{ github.event.inputs.VersionPrefix }} + --property:VersionSuffix=${{ github.event.inputs.VersionSuffix }} + "src/Communication.UI.Blazor/Communication.UI.Blazor.csproj" + + - name: Publish the package to nuget.org + run: dotnet nuget push "src/Communication.UI.Blazor/bin/Release/*.nupkg" --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json