From 3a99a4df6aa28d886efbe531a4b63d87fc40574b Mon Sep 17 00:00:00 2001 From: Nik Date: Tue, 1 Oct 2024 22:52:12 +0100 Subject: [PATCH] [AMEND] Workflow to use tag as version --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0530d8a..696711b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,9 +26,12 @@ jobs: uses: actions/setup-dotnet@v2 with: dotnet-version: 8.0.x + + - name: Set VERSION variable from tag + run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV - name: Build project - run: dotnet build src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --configuration Release + run: dotnet build src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --configuration Release /p:Version=${VERSION} - name: Push to NuGet run: dotnet nuget push **\*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json