From e5599ad340ad107640a2cb70d42b235c9788fe59 Mon Sep 17 00:00:00 2001 From: Sakura Akeno Isayeki Date: Sat, 17 Feb 2024 18:06:27 +0100 Subject: [PATCH] ci(package/api): Add dotnet_common_args to build and publish steps This commit adds the `dotnet_common_args` environment variable to the build and publish steps in the GitHub Actions workflow for building the package API. This variable is used to specify additional arguments for the `dotnet build` and `dotnet publish` commands, specifically `/p:IncludeSourceRevisionInInformationalVersion=false`. --- .github/workflows/build-package-api.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-package-api.yml b/.github/workflows/build-package-api.yml index 74456de..1bb3689 100644 --- a/.github/workflows/build-package-api.yml +++ b/.github/workflows/build-package-api.yml @@ -12,6 +12,10 @@ permissions: contents: read packages: read +env: + dotnet_common_args: | + /p:IncludeSourceRevisionInInformationalVersion=false + jobs: # Build prod build-api-prod: @@ -29,10 +33,10 @@ jobs: # include-prerelease: true - name: Build .NET project (prod) - run: dotnet build ./WowsKarma.Api/WowsKarma.Api.csproj --configuration ${{ inputs.build_configuration }} + run: dotnet build ./WowsKarma.Api/WowsKarma.Api.csproj --configuration ${{ inputs.build_configuration }} ${{ env.dotnet_common_args }} - name: Package API (prod) - run: dotnet publish ./WowsKarma.Api/WowsKarma.Api.csproj --configuration ${{ inputs.build_configuration }} --output ./publish + run: dotnet publish ./WowsKarma.Api/WowsKarma.Api.csproj --configuration ${{ inputs.build_configuration }} --output ./publish ${{ env.dotnet_common_args }} - name: Upload Artifacts uses: actions/upload-artifact@v4