Skip to content

Merge pull request #682 from Cysharp/feature/RefactorStreamingHub #279

Merge pull request #682 from Cysharp/feature/RefactorStreamingHub

Merge pull request #682 from Cysharp/feature/RefactorStreamingHub #279

Workflow file for this run

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