Merge pull request #5975 from bdach/key-binding-container-unrooting #48
Workflow file for this run
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: Pack and nuget | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
notify_pending_production_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Submit pending deployment notification | |
run: | | |
export TITLE="Pending osu-framework Production Deployment: $GITHUB_REF_NAME" | |
export URL="https://github.com/ppy/osu-framework/actions/runs/$GITHUB_RUN_ID" | |
export DESCRIPTION="Awaiting approval for building NuGet packages for tag $GITHUB_REF_NAME: | |
[View Workflow Run]($URL)" | |
export ACTOR_ICON="https://avatars.githubusercontent.com/u/$GITHUB_ACTOR_ID" | |
BODY="$(jq --null-input '{ | |
"embeds": [ | |
{ | |
"title": env.TITLE, | |
"color": 15098112, | |
"description": env.DESCRIPTION, | |
"url": env.URL, | |
"author": { | |
"name": env.GITHUB_ACTOR, | |
"icon_url": env.ACTOR_ICON | |
} | |
} | |
] | |
}')" | |
curl \ | |
-H "Content-Type: application/json" \ | |
-d "$BODY" \ | |
"${{ secrets.DISCORD_INFRA_WEBHOOK_URL }}" | |
pack-framework: | |
name: Pack (Framework) | |
runs-on: windows-latest | |
environment: production | |
defaults: | |
run: | |
shell: powershell | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set artifacts directory | |
id: artifactsPath | |
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts" | |
- name: Install .NET 6.0.x | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "6.0.x" | |
- name: Pack (Framework) | |
run: dotnet pack -c Release osu.Framework /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg -o ${{steps.artifactsPath.outputs.nuget_artifacts}} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: osu-framework | |
path: | | |
${{steps.artifactsPath.outputs.nuget_artifacts}}\*.nupkg | |
${{steps.artifactsPath.outputs.nuget_artifacts}}\*.snupkg | |
- name: Publish packages to nuget.org | |
run: dotnet nuget push ${{steps.artifactsPath.outputs.nuget_artifacts}}\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
pack-template: | |
name: Pack (Templates) | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set artifacts Directory | |
id: artifactsPath | |
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts" | |
- name: Install .NET 6.0.x | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "6.0.x" | |
- name: Replace project references | |
run: osu.Framework.Templates/replace-references.sh ${{ github.ref_name }} | |
- name: Pack (Template) | |
run: dotnet pack -c Release osu.Framework.Templates /p:Configuration=Release /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true /p:NoDefaultExcludes=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: osu-framework-templates | |
path: ${{steps.artifactsPath.outputs.nuget_artifacts}}/*.nupkg | |
- name: Publish packages to nuget.org | |
run: dotnet nuget push ${{steps.artifactsPath.outputs.nuget_artifacts}}/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
pack-android: | |
name: Pack (Android) | |
runs-on: windows-latest | |
environment: production | |
defaults: | |
run: | |
shell: powershell | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set artifacts directory | |
id: artifactsPath | |
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts" | |
- name: Install .NET 6.0.x | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "6.0.x" | |
- name: Restore .NET workloads | |
run: dotnet workload install android | |
- name: Pack (Android Framework) | |
run: dotnet pack -c Release osu.Framework.Android /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: osu-framework-android | |
path: ${{steps.artifactsPath.outputs.nuget_artifacts}}\*.nupkg | |
- name: Publish packages to nuget.org | |
run: dotnet nuget push ${{steps.artifactsPath.outputs.nuget_artifacts}}\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
pack-ios: | |
name: Pack (iOS) | |
runs-on: macos-latest | |
environment: production | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set artifacts directory | |
id: artifactsPath | |
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts" | |
- name: Install .NET 6.0.x | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "6.0.x" | |
- name: Restore .NET Workloads | |
# `dotnet workload restore` is bugged in .NET 7.0.101+ when restoring iOS projects, | |
# see https://github.com/xamarin/xamarin-macios/issues/16400. | |
run: dotnet workload install ios | |
- name: Pack (iOS Framework) | |
run: dotnet pack -c Release osu.Framework.iOS /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: osu-framework-ios | |
path: ${{steps.artifactsPath.outputs.nuget_artifacts}}/*.nupkg | |
- name: Publish packages to nuget.org | |
run: dotnet nuget push ${{steps.artifactsPath.outputs.nuget_artifacts}}/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |