diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d41d062..db147f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,35 +5,13 @@ name: Release Package on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+*" + - "[0-9]+.[0-9]+.[0-9]+*" jobs: - # build: + build: - # runs-on: windows-latest - - # steps: - - # - name: Checkout repository - # uses: actions/checkout@v3 - - # - name: Setup .NET v6 - # uses: actions/setup-dotnet@v2 - # with: - # dotnet-version: 6.0.x - - # - name: Setup .NET v8 - # uses: actions/setup-dotnet@v2 - # with: - # dotnet-version: 8.0.x - - # - name: Build project - # run: dotnet build src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --configuration Release - - pack: runs-on: windows-latest - #needs: build - if: github.event_name == 'push' + steps: - name: Checkout repository @@ -48,15 +26,15 @@ 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: Show VERSION - run: echo "${VERSION}" + run: echo "$GITHUB_REF_NAME" + + - name: Build project + run: dotnet build src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --configuration Release -p:Version=$GITHUB_REF_NAME - name: Pack - run: dotnet pack src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --output ./artifacts --configuration Release -p:Version=$VERSION + run: dotnet pack src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --output ./artifacts --configuration Release -p:Version=$GITHUB_REF_NAME - uses: actions/upload-artifact@v4 with: name: artifacts @@ -64,7 +42,7 @@ jobs: publish: runs-on: ubuntu-latest - needs: pack + needs: build if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') steps: - name: Setup .NET v8