|
| 1 | +# This workflow will build a .NET project |
| 2 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net |
| 3 | + |
| 4 | +name: .NET |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ "3.8.2" ] |
| 9 | + pull_request: |
| 10 | + branches: [ "3.8.2" ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + - name: Setup .NET |
| 20 | + uses: actions/setup-dotnet@v4 |
| 21 | + with: |
| 22 | + dotnet-version: 8.0.x |
| 23 | + - name: Archive Tutorial/BasicCameraExample |
| 24 | + uses: actions/upload-artifact@v4 |
| 25 | + with: |
| 26 | + name: BasicCameraExample |
| 27 | + path: Tutorials/BasicCameraExample/** |
| 28 | + include-hidden-files: true |
| 29 | + - name: Archive ShipGame |
| 30 | + uses: actions/upload-artifact@v4 |
| 31 | + with: |
| 32 | + name: ShipGame |
| 33 | + path: ShipGame/** |
| 34 | + include-hidden-files: true |
| 35 | + - name: Archive NeonShooter |
| 36 | + uses: actions/upload-artifact@v4 |
| 37 | + with: |
| 38 | + name: NeonShooter |
| 39 | + path: NeonShooter/** |
| 40 | + include-hidden-files: true |
| 41 | + - name: Archive Platformer2D |
| 42 | + uses: actions/upload-artifact@v4 |
| 43 | + with: |
| 44 | + name: Platformer2D |
| 45 | + path: Platformer2D/** |
| 46 | + include-hidden-files: true |
| 47 | + - name: Archive AutoPong |
| 48 | + uses: actions/upload-artifact@v4 |
| 49 | + with: |
| 50 | + name: AutoPong |
| 51 | + path: AutoPong/** |
| 52 | + include-hidden-files: true |
| 53 | + - name: Archive FuelCell |
| 54 | + uses: actions/upload-artifact@v4 |
| 55 | + with: |
| 56 | + name: FuelCell |
| 57 | + path: FuelCell/** |
| 58 | + include-hidden-files: true |
| 59 | + |
| 60 | + deploy: |
| 61 | + name: Deploy |
| 62 | + needs: [ build ] |
| 63 | + runs-on: ubuntu-latest |
| 64 | + if: ${{ github.event_name == 'push' }} |
| 65 | + permissions: |
| 66 | + packages: write |
| 67 | + contents: write |
| 68 | + steps: |
| 69 | + - name: Clone Repository |
| 70 | + uses: actions/checkout@v4 |
| 71 | + - name: Expose GitHub Runtime |
| 72 | + uses: crazy-max/ghaction-github-runtime@v3 |
| 73 | + - name: Make a Release |
| 74 | + if: github.ref_type == 'tag' |
| 75 | + uses: ncipollo/release-action@v1 |
| 76 | + with: |
| 77 | + name: 'MonoGame ${{ github.ref_name }}' |
| 78 | + tag: ${{ github.ref_name }} |
| 79 | + allowUpdates: true |
| 80 | + removeArtifacts: true |
| 81 | + artifacts: "*.zip" |
| 82 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments