build.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. if %errorlevel% neq 0 (
  29. exit /b 0
  30. )
  31. echo "Describe=$Describe" >> $GITHUB_ENV
  32. exit 0
  33. - name: Set Hash as Describe when Describe is Blank
  34. if: ${{ ! env.Describe }}
  35. shell: bash
  36. run: |
  37. Hash=`git rev-parse --short HEAD`
  38. echo "Describe=$Hash" >> $GITHUB_ENV
  39. - name: Setup MSBuild.exe
  40. uses: microsoft/setup-msbuild@v2
  41. with:
  42. msbuild-architecture: x64
  43. - name: Build
  44. run: msbuild "Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj" -p:Configuration=${{ matrix.configuration }}
  45. - name: Upload a Build Artifact
  46. uses: actions/upload-artifact@v4
  47. with:
  48. name: ${{ matrix.configuration }} ${{ env.Describe }}
  49. path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe