Merge pull request #876 from Cysharp/feature/FixHeartbeatComment #2
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 | ||
- release/** | ||
tags: | ||
- "!*" # not a tag push | ||
paths-ignore: | ||
- '**.md' | ||
- .github/** | ||
- docs/** | ||
- samples/** | ||
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@v4 | ||
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main | ||
- 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 --no-build -p:VersionSuffix=${MAGICONION_VERSION} -o ./publish | ||
- uses: Cysharp/Actions/.github/actions/upload-artifact@main | ||
with: | ||
name: nuget | ||
path: ./publish/ | ||
retention-days: 1 | ||
canary-push: | ||
needs: [canary-build] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
env: | ||
NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED: true | ||
steps: | ||
- name: Load secrets | ||
id: op-load-secret | ||
uses: 1password/load-secrets-action@v2 | ||
with: | ||
export-env: false | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN_PUBLIC }} | ||
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS_PUBLIC_CANARY: "op://GitHubActionsPublic/VSS_NUGET_EXTERNAL_FEED_ENDPOINTS_PUBLIC_CANARY/credential" | ||
- uses: Cysharp/Actions/.github/actions/download-artifact@main | ||
# Upload to NuGet | ||
- run: echo "VSS_NUGET_EXTERNAL_FEED_ENDPOINTS=${FEED_ENDPOINTS}" >> $GITHUB_ENV | ||
env: | ||
FEED_ENDPOINTS: ${{ steps.op-load-secret.outputs.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 | ||
actions-timeline: | ||
Check failure on line 63 in .github/workflows/build-canary.yml GitHub Actions / Build CanaryInvalid workflow file
|
||
needs: [canary-build, canary-push] | ||
uses: Cysharp/Actions/.github/workflows/actions-timeline.yaml@main | ||
secrets: inherit |