Merge pull request #6465 from jamesbt365/opentabletdriver-0.6.5.0 #147
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@v4 | |
- name: Set artifacts directory | |
id: artifactsPath | |
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts" | |
- name: Install .NET 8.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.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@v4 | |
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@v4 | |
- name: Set artifacts Directory | |
id: artifactsPath | |
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts" | |
- name: Install .NET 8.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.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@v4 | |
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@v4 | |
- name: Set artifacts directory | |
id: artifactsPath | |
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts" | |
- name: Install .NET 8.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.x" | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: microsoft | |
java-version: 11 | |
- name: Restore .NET workloads | |
# since windows image 20241113.3.0, not specifying a version here | |
# installs the .NET 7 version of android workload for very unknown reasons. | |
# revisit once we upgrade to .NET 9, it's probably fixed there. | |
run: dotnet workload install android --version (dotnet --version) | |
- 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@v4 | |
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@v4 | |
- name: Set artifacts directory | |
id: artifactsPath | |
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts" | |
- name: Install .NET 8.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.x" | |
- name: Restore .NET Workloads | |
run: dotnet workload install ios --from-rollback-file workloads.json | |
- 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@v4 | |
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 |