Also patch tools to match MG version #64
This file contains hidden or 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
| # This workflow will build a .NET project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
| name: .NET | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - '3.8.*' | |
| pull_request: | |
| branches: | |
| - '3.8.*' | |
| schedule: | |
| - cron: "0 3 * * 1" # Weekly (Mon) build to keep artifacts fresh | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Build Windows Binary for Tutorial/BasicCameraExample | |
| run: dotnet build Tutorials/BasicCameraExample/BasicCameraExample.sln | |
| - name: Archive Tutorial/BasicCameraExample | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: BasicCameraExample | |
| path: Tutorials/BasicCameraExample/** | |
| include-hidden-files: true | |
| - name: Build Windows Binary for AutoPong | |
| run: dotnet build AutoPong/AutoPong.WindowsDX/AutoPong.WindowsDX.csproj | |
| - name: Archive AutoPong | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: AutoPong | |
| path: AutoPong/** | |
| include-hidden-files: true | |
| - name: Build Windows Binary for FuelCell | |
| run: dotnet build FuelCell/FuelCell.WindowsDX/FuelCell.WindowsDX.csproj | |
| - name: Archive FuelCell | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: FuelCell | |
| path: FuelCell/** | |
| include-hidden-files: true | |
| - name: Build Windows Binary for NeonShooter | |
| run: dotnet build NeonShooter/NeonShooter.WindowsDX/NeonShooter.WindowsDX.csproj | |
| - name: Archive NeonShooter | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: NeonShooter | |
| path: NeonShooter/** | |
| include-hidden-files: true | |
| - name: Build Windows Binary for Platformer2D | |
| run: dotnet build Platformer2D/Platformer2D.WindowsDX/Platformer2D.WindowsDX.csproj | |
| - name: Archive Platformer2D | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Platformer2D | |
| path: Platformer2D/** | |
| include-hidden-files: true | |
| - name: Build ShipGame COntent Processor in Release mode | |
| run: dotnet build ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj --configuration Release | |
| - name: Build Windows Binary for ShipGame | |
| run: dotnet build ShipGame/ShipGame.WindowsDX/ShipGame.WindowsDX.csproj | |
| - name: Archive ShipGame | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ShipGame | |
| path: ShipGame/** | |
| include-hidden-files: true | |
| - name: Build learn-monogame-2d Binary | |
| run: dotnet build Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlime.csproj --configuration Release | |
| - name: Archive Platformer2D | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Learn-monogame-2d | |
| path: Tutorials/learn-monogame-2d/src/27-Conclusion/** | |
| include-hidden-files: true | |
| 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: Expose GitHub Runtime | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - 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: "*.zip" | |
| token: ${{ secrets.GITHUB_TOKEN }} |