build.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Build
  2. on:
  3. push:
  4. paths:
  5. - 'Plain Craft Launcher 2/**'
  6. - '.github/workflows/**'
  7. pull_request:
  8. paths:
  9. - 'Plain Craft Launcher 2/**'
  10. - '.github/workflows/**'
  11. workflow_dispatch:
  12. jobs:
  13. build:
  14. strategy:
  15. matrix:
  16. configuration: [Debug, Release, Snapshot, BETA, ReleaseUpdate]
  17. runs-on: windows-latest
  18. steps:
  19. - name: Checkout
  20. uses: actions/checkout@v4
  21. with:
  22. fetch-depth: 0
  23. - name: Set Describe
  24. continue-on-error: true
  25. shell: bash
  26. run: |
  27. Describe=`git describe --tags`
  28. echo "Describe=$Describe" >> $GITHUB_ENV
  29. - name: Set Hash as Describe when Describe is Blank
  30. if: ${{ env.Describe }}
  31. shell: bash
  32. run: |
  33. Hash=`git rev-parse --short HEAD`
  34. echo "Describe=$Hash" >> $GITHUB_ENV
  35. - name: Setup MSBuild.exe
  36. uses: microsoft/setup-msbuild@v2
  37. with:
  38. msbuild-architecture: x64
  39. - name: Build
  40. run: msbuild "Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj" -p:Configuration=${{ matrix.configuration }}
  41. - name: Upload a Build Artifact
  42. uses: actions/upload-artifact@v4
  43. with:
  44. name: ${{ matrix.configuration }} ${{ env.Describe }}
  45. path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe