source: Main/trunk/.github/workflows/build.yml@ 152

Last change on this file since 152 was 108, checked in by Nishi, on Sep 21, 2024 at 12:01:22 AM

get openssl

File size: 2.6 KB
Line 
1# $Id$
2
3name: "Build Tewi HTTPd"
4
5on:
6 workflow_dispatch:
7 push:
8
9concurrency:
10 group: "build"
11 cancel-in-progress: true
12
13jobs:
14 build-win32:
15 name: "Build for Windows 32-bit"
16 runs-on: ubuntu-latest
17
18 permissions:
19 contents: write
20
21 steps:
22 - name: Checkout
23 uses: actions/checkout@v4
24 - name: Install packages
25 run: sudo apt-get install nsis mingw-w64
26 - name: Get OpenSSL
27 run: git clone https://github.com/clamwin/openssl
28 - name: Make it use the correct library
29 run: cp openssl/lib/mingw/x86/*.a openssl/lib/
30 - name: Build
31 run: ./installer.sh win32
32 - name: Rename
33 run: mv install-nossl.exe tewiinst32-nossl.exe && mv install-ssl.exe tewiinst32-ssl.exe
34 - name: Create a zipfile
35 run: zip -rv tewiinst32.zip tewiinst32-*.exe
36 - name: Upload artifact
37 uses: actions/upload-artifact@v4
38 with:
39 name: build-win32
40 path: tewiinst32.zip
41
42 build-win64:
43 name: "Build for Windows 64-bit"
44 runs-on: ubuntu-latest
45
46 permissions:
47 contents: write
48
49 steps:
50 - name: Checkout
51 uses: actions/checkout@v4
52 - name: Install packages
53 run: sudo apt-get install nsis mingw-w64
54 - name: Get OpenSSL
55 run: git clone https://github.com/clamwin/openssl
56 - name: Make it use the correct library
57 run: cp openssl/lib/mingw/x64/*.a openssl/lib/
58 - name: Build
59 run: ./installer.sh win64
60 - name: Rename
61 run: mv install-nossl.exe tewiinst64-nossl.exe && mv install-ssl.exe tewiinst64-ssl.exe
62 - name: Create a zipfile
63 run: zip -rv tewiinst64.zip tewiinst64-*.exe
64 - name: Upload artifact
65 uses: actions/upload-artifact@v4
66 with:
67 name: build-win64
68 path: tewiinst64.zip
69
70 release:
71 name: "Release"
72 runs-on: ubuntu-latest
73
74 permissions:
75 contents: write
76
77 needs: [build-win32, build-win64]
78
79 steps:
80 - name: Checkout
81 uses: actions/checkout@v4
82 - name: Download from build-win32
83 uses: actions/download-artifact@v4
84 with:
85 name: build-win32
86 - name: Download from build-win64
87 uses: actions/download-artifact@v4
88 with:
89 name: build-win64
90 - name: Extract
91 run: unzip tewiinst32.zip && unzip tewiinst64.zip
92 - name: Delete old release
93 run: gh release delete "$(make get-version)" --cleanup-tag -y || true
94 env:
95 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96 - name: Release
97 run: gh release create -t "v$(make get-version)" "$(make get-version)" tewiinst32*.exe tewiinst64*.exe -n "Version \`$(make get-version)\` was build in this release"
98 env:
99 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Note: See TracBrowser for help on using the repository browser.