Release #707
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bump: | |
| description: 'Release level' | |
| required: true | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| channel: | |
| description: 'Release channel. none = stable RTM; alpha/beta/rc cut a pre-release (e.g. major + beta -> 6.0.0-beta.1, then 6.0.0-beta.2). Finalise by re-running with the same bump and channel=none.' | |
| required: true | |
| default: none | |
| type: choice | |
| options: | |
| - none | |
| - alpha | |
| - beta | |
| - rc | |
| sourceRef: | |
| description: 'Optional git ref (tag/branch/SHA) to release from. Leave blank to release from this branch (normally main).' | |
| required: false | |
| type: string | |
| default: '' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: read | |
| jobs: | |
| release: | |
| uses: reactiveui/actions-common/.github/workflows/workflow-common-release.yml@main | |
| with: | |
| solutionFile: reactiveui.slnx | |
| installWorkloads: true | |
| # Release tags are unprefixed (e.g. 23.2.28); the workflow default is 'v'. | |
| minverTagPrefix: '' | |
| bump: ${{ inputs.bump }} | |
| preRelease: ${{ inputs.channel != 'none' && inputs.channel || '' }} | |
| ref: ${{ inputs.sourceRef }} | |
| secrets: | |
| CERTUM_USER_ID: ${{ secrets.CERTUM_USER_ID }} | |
| CERTUM_OTP_URI: ${{ secrets.CERTUM_OTP_URI }} | |
| CERTUM_CERT_FINGERPRINT: ${{ secrets.CERTUM_CERT_FINGERPRINT }} | |
| publish-nuget: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download signed packages | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: signed-nuget | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| - name: NuGet login (OIDC trusted publishing) | |
| id: nuget-login | |
| uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0 | |
| with: | |
| user: ${{ secrets.NUGET_USER }} | |
| - name: Push to NuGet | |
| shell: bash | |
| run: | | |
| for pkg in *.nupkg; do | |
| dotnet nuget push "$pkg" --source https://api.nuget.org/v3/index.json --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" | |
| done | |
| create-release: | |
| needs: [release, publish-nuget] | |
| uses: reactiveui/actions-common/.github/workflows/workflow-common-create-release.yml@main | |
| with: | |
| version: ${{ needs.release.outputs.semver2 }} | |
| tag: ${{ needs.release.outputs.tag }} | |
| target: ${{ needs.release.outputs.sourceSha }} | |
| prerelease: ${{ needs.release.outputs.prerelease == 'true' }} |