Merge pull request #678 from Cysharp/feature/GrpcNetClientOptionsFactory #275
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: build-canary | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "!*" # not a tag push | |
workflow_dispatch: | |
env: | |
DISABLE_NETFX_TARGET_BUILD: 1 | |
BUILD_CONFIG: Release | |
jobs: | |
canary-build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-dotnet | |
- run: echo "MAGICONION_VERSION=ci-$(date '+%Y%m%d-%H%M%S')+${GITHUB_SHA:0:6}" >> $GITHUB_ENV | |
- run: echo "MAGICONION_VERSION=${MAGICONION_VERSION}" | |
# build | |
- run: dotnet build -c ${{ env.BUILD_CONFIG }} ./MagicOnion.sln | |
# pack | |
- run: dotnet pack -c ${{ env.BUILD_CONFIG }} ./MagicOnion.Packaging.slnf --include-symbols --include-source --no-build -p:VersionSuffix=${MAGICONION_VERSION} -o ./publish | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: nuget | |
path: ./publish/ | |
canary-build-experimental: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-dotnet | |
- run: echo "MAGICONION_VERSION=ci-$(date '+%Y%m%d-%H%M%S')+${GITHUB_SHA:0:6}" >> $GITHUB_ENV | |
- run: echo "MAGICONION_VERSION=${MAGICONION_VERSION}" | |
# build | |
- run: dotnet build ./src/MagicOnion.Server.OpenTelemetry/ -c ${{ env.BUILD_CONFIG }} -p:VersionSuffix=${MAGICONION_VERSION} | |
# test | |
- run: dotnet pack ./src/MagicOnion.Server.OpenTelemetry/MagicOnion.Server.OpenTelemetry.csproj -c ${{ env.BUILD_CONFIG }} --include-symbols --include-source --no-build -p:VersionSuffix=${MAGICONION_VERSION} -o ./publish | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: nuget-experimental | |
path: ./publish/ | |
canary-push: | |
needs: [canary-build, canary-build-experimental] | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
env: | |
NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED: true | |
steps: | |
- uses: actions/download-artifact@v2 | |
# Upload to NuGet | |
- run: echo "VSS_NUGET_EXTERNAL_FEED_ENDPOINTS=${FEED_ENDPOINTS}" >> $GITHUB_ENV | |
env: | |
FEED_ENDPOINTS: ${{ secrets.VSS_NUGET_EXTERNAL_FEED_ENDPOINTS_PUBLIC_CANARY }} | |
- run: wget -qO- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash | |
- run: dotnet nuget push "./nuget/*.nupkg" --skip-duplicate -s https://pkgs.dev.azure.com/cysharp/Public/_packaging/Canary-Build/nuget/v2 -k AzureDevOps |