Skip to content

Merge remote-tracking branch 'upstream/develop' into native #59

Merge remote-tracking branch 'upstream/develop' into native

Merge remote-tracking branch 'upstream/develop' into native #59

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
name: build-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
fail-fast: false
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Add msbuild to PATH
if: runner.os == 'Windows'
uses: microsoft/[email protected]
- name: Setup Premake5
uses: abel0b/[email protected]
with:
version: "5.0.0-beta2"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '11'
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: 1.3.283.0
cache: true
- name: Disable annotations
run: echo "::remove-matcher owner=csc::"
- name: Install required workloads
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
echo "MICROSOFT SUPPORT ANDROID WORKLOAD ON LINUX PLZZZ!"
elif [ "$RUNNER_OS" == "Windows" ]; then
dotnet.exe workload install android ios macos
else
dotnet workload install android ios macos
fi
shell: bash
- name: Build
run: dotnet run --project build/Build.csproj -- --target=Default
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Upload Artifacts
run: dotnet run --project build/Build.csproj -- --target=UploadArtifacts
env:
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
deploy:
name: Deploy
needs: [ build ]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
permissions:
packages: write
contents: write
steps:
- name: Clone Repository
uses: actions/checkout@v4
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Push Nugets
run: dotnet run --project build/Build.csproj -- --target=Deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
- name: Make a Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: 'MonoGame ${{ github.ref_name }}'
tag: ${{ github.ref_name }}
allowUpdates: true
removeArtifacts: true
artifacts: "nugets/*.nupkg"
token: ${{ secrets.GITHUB_TOKEN }}