|
15 | 15 | - README.md |
16 | 16 |
|
17 | 17 | env: |
18 | | - CurrentSemanticVersionBase: '99.0.0' |
19 | | - PreviewNumber: $[counter(variables['CurrentSemanticVersionBase'], 1001)] |
20 | | - CurrentSemanticVersion: '$(CurrentSemanticVersionBase)-preview$(PreviewNumber)' |
21 | | - NugetPackageVersion: '$(CurrentSemanticVersion)' |
| 18 | + # When we create a tag, we set the NuGet version to the tag number, the below values are only for PR builds. |
| 19 | + CurrentSemanticVersionBase: '99.0.0' # Only used for PR builds |
| 20 | + NugetPackageVersion: '99.0.0-preview${{ github.run_number }}' # Only used for PR builds |
22 | 21 | NET_VERSION: '9.0.x' |
23 | 22 | RunPoliCheck: false |
24 | 23 | PathToLibrarySolution: 'src/CommunityToolkit.Maui.Markup.sln' |
|
93 | 92 |
|
94 | 93 | - name: Set NuGet Version to Tag Number |
95 | 94 | if: startsWith(github.ref, 'refs/tags/') |
96 | | - run: echo "NugetPackageVersion=${{ github.ref }}" >> $GITHUB_ENV |
| 95 | + run: echo "NugetPackageVersion=${${{ github.ref }}#refs/tags/}" >> $GITHUB_ENV |
97 | 96 |
|
98 | 97 | - name: Set NuGet Version to PR Version |
99 | 98 | if: ${{ github.event_name == 'pull_request' }} |
@@ -194,7 +193,7 @@ jobs: |
194 | 193 |
|
195 | 194 | sign: |
196 | 195 | needs: [build_library] |
197 | | - if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/') }} |
| 196 | + if: ${{ startsWith(github.ref, 'refs/tags/') }} |
198 | 197 | runs-on: windows-latest |
199 | 198 | permissions: |
200 | 199 | id-token: write # Required for requesting the JWT |
@@ -247,7 +246,7 @@ jobs: |
247 | 246 | ${{ github.workspace }}/packages/**/*.nupkg |
248 | 247 |
|
249 | 248 | release: |
250 | | - if: ${{ startsWith(github.ref, 'refs/heads/rel/') }} |
| 249 | + if: ${{ startsWith(github.ref, 'refs/tags/') }} |
251 | 250 | needs: [sign] |
252 | 251 | environment: nuget-release-gate # This gates this job until manually approved |
253 | 252 | runs-on: ubuntu-latest |
|
0 commit comments