Release AITSYS.Vimeo.OTT #9
This file contains 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 AITSYS.Vimeo.OTT" | |
on: | |
workflow_dispatch: | |
inputs: | |
version_suffix: | |
description: "Version Suffix" | |
required: false | |
type: string | |
release_as_prerelease: | |
description: "Release as pre-release" | |
required: true | |
type: boolean | |
default: true | |
confirm_full_release: | |
description: "Confirm that you want to release as a full release" | |
required: false | |
type: boolean | |
default: false | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true | |
jobs: | |
release: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
name: Build library and release | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check Intention | |
if: ${{!inputs.release_as_prerelease}} | |
run: | | |
if [ "${{ inputs.confirm_full_release }}" = "false" ]; then | |
echo "Full release not confirmed, exiting." | |
exit 1 | |
fi | |
- name: Setup .NET | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 9.x | |
- name: Restore dependencies | |
run: dotnet restore --no-cache -f -v minimal AITSYS.Vimeo.Ott.sln | |
- name: Build AITSYS.Vimeo.Ott as full release | |
if: ${{ !inputs.release_as_prerelease }} | |
shell: pwsh | |
run: ./rebuild-lib.ps1 -ArtifactLocation ./avo-artifacts -Configuration Release | |
# env: | |
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
# SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
# SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
- name: Build AITSYS.Vimeo.Ott as pre-release | |
if: ${{ inputs.release_as_prerelease }} | |
shell: pwsh | |
run: ./rebuild-lib.ps1 -ArtifactLocation ./avo-artifacts -Configuration Release -VersionSuffix ${{github.event.inputs.version_suffix}} | |
# env: | |
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
# SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
# SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
- name: Publish to NuGet | |
shell: pwsh | |
run: dotnet nuget push --source https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} * --skip-duplicate | |
working-directory: ./avo-artifacts | |
- name: Publish to GitHub Packages | |
shell: pwsh | |
run: dotnet nuget push --source https://nuget.pkg.github.com/Aiko-IT-Systems/index.json -k ${{secrets.NYUW_TOKEN_GH}} * | |
working-directory: ./avo-artifacts |