Skip to content

Commit 164b88c

Browse files
committed
Add workflow for creating Windows installer
1 parent cafe15f commit 164b88c

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.github/workflows/ci.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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: 'Add MSBuild to path'
31+
uses: microsoft/setup-msbuild@v1.1
32+
33+
- name: 'Setup vcpkg integration'
34+
shell: pwsh
35+
run: |
36+
vcpkg integrate install
37+
38+
- name: 'Install dependencies (x86)'
39+
shell: pwsh
40+
run: |
41+
vcpkg --triplet=x86-windows install --recurse libpng libjpeg-turbo gettext luajit cspice
42+
43+
- name: 'Install dependencies (x64)'
44+
shell: pwsh
45+
run: |
46+
vcpkg --triplet=x64-windows install --recurse libpng libjpeg-turbo gettext[tools] luajit cspice
47+
echo "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/tools/gettext/bin" >> $env:GITHUB_PATH
48+
49+
- name: 'Checkout source code'
50+
uses: actions/checkout@v3
51+
52+
- name: 'Build Win32'
53+
shell: pwsh
54+
run: |
55+
msbuild celestia.sln /p:Configuration=Release /p:Platform=Win32
56+
perl po/translate_resources.pl Win32
57+
58+
- name: 'Build x64'
59+
shell: pwsh
60+
run: |
61+
msbuild celestia.sln /p:Configuration=Release /p:Platform=x64
62+
perl po/translate_resources.pl x64
63+
64+
- name: 'Create installer'
65+
shell: pwsh
66+
run: ISCC celestia.iss
67+
68+
- name: 'Upload artifacts'
69+
uses: actions/upload-artifact@v3
70+
if: success()
71+
with:
72+
name: celestia-1.6
73+
path: |
74+
${{github.workspace}}/Output/**.exe

0 commit comments

Comments
 (0)