|
| 1 | +name: Celestia |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ 1.6.x ] |
| 6 | + paths: [ src/**, .github/workflows/ci.yml, celestia.sln, celestia.vcxproj, celestia.iss ] |
| 7 | + pull_request: |
| 8 | + branches: [ 1.6.x ] |
| 9 | + paths: [ src/**, .github/workflows/ci.yml, celestia.sln, celestia.vcxproj, celestia.iss ] |
| 10 | + |
| 11 | +jobs: |
| 12 | + build-windows: |
| 13 | + name: "Build and package Windows" |
| 14 | + runs-on: windows-latest |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: 'Setup NuGet Credentials' |
| 20 | + shell: 'bash' |
| 21 | + run: > |
| 22 | + $(c:/vcpkg/vcpkg fetch nuget | tail -n 1) |
| 23 | + sources add |
| 24 | + -source "https://nuget.pkg.github.com/CelestiaProject/index.json" |
| 25 | + -storepasswordincleartext |
| 26 | + -name "GitHub" |
| 27 | + -username "CelestiaProject" |
| 28 | + -password "${{ secrets.GITHUB_TOKEN }}" |
| 29 | +
|
| 30 | + - name: 'Install dependencies' |
| 31 | + shell: 'cmd' |
| 32 | + run: | |
| 33 | + vcpkg --triplet=x86-windows install --recurse libpng libjpeg-turbo gettext luajit eigen3 cspice |
| 34 | + vcpkg --triplet=x64-windows install --recurse libpng libjpeg-turbo gettext luajit eigen3 cspice |
| 35 | +
|
| 36 | + - name: 'Checkout source code' |
| 37 | + uses: actions/checkout@v3 |
| 38 | + |
| 39 | + - name: Build Win32 |
| 40 | + shell: 'cmd' |
| 41 | + run: msbuild.exe celestia.sln /p:Configuration=Release /p:Platform=Win32 |
| 42 | + |
| 43 | + - name: Build x64 |
| 44 | + shell: 'cmd' |
| 45 | + run: msbuild.exe celestia.sln /p:Configuration=Release /p:Platform=x64 |
| 46 | + |
| 47 | + - name: Build localizations |
| 48 | + shell: 'cmd' |
| 49 | + run: | |
| 50 | + perl.exe po/translate_resources.pl Win32 |
| 51 | + perl.exe po/translate_resources.pl x64 |
| 52 | +
|
| 53 | + - name: Create installer |
| 54 | + shell: 'cmd' |
| 55 | + run: ISCC.exe celestia.iss |
| 56 | + |
| 57 | + - name: Upload artifacts |
| 58 | + uses: actions/upload-artifact@v3 |
| 59 | + if: success() |
| 60 | + with: |
| 61 | + name: celestia-1.6 |
| 62 | + path: | |
| 63 | + ${{github.workspace}}/Output/**.exe |
0 commit comments