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

Last change on this file since 203 was 203, checked in by Nishi, on Sep 30, 2024 at 10:31:13 AM

add if condition to github actions

File size: 2.8 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 if: ${{ !contains(github.event.head_commit.message, '[release') }}
18
19 permissions:
20 contents: write
21
22 steps:
23 - name: Checkout
24 uses: actions/checkout@v4
25 - name: Install packages
26 run: sudo apt-get install nsis mingw-w64
27 - name: Get OpenSSL
28 run: git clone https://github.com/clamwin/openssl
29 - name: Make it use the correct library
30 run: cp openssl/lib/mingw/x86/*.a openssl/lib/
31 - name: Build
32 run: ./installer.sh win32
33 - name: Rename
34 run: mv install-nossl.exe tewiinst32-nossl.exe && mv install-ssl.exe tewiinst32-ssl.exe
35 - name: Create a zipfile
36 run: zip -rv tewiinst32.zip tewiinst32-*.exe
37 - name: Upload artifact
38 uses: actions/upload-artifact@v4
39 with:
40 name: build-win32
41 path: tewiinst32.zip
42
43 build-win64:
44 name: "Build for Windows 64-bit"
45 runs-on: ubuntu-latest
46 if: ${{ !contains(github.event.head_commit.message, '[release') }}
47
48 permissions:
49 contents: write
50
51 steps:
52 - name: Checkout
53 uses: actions/checkout@v4
54 - name: Install packages
55 run: sudo apt-get install nsis mingw-w64
56 - name: Get OpenSSL
57 run: git clone https://github.com/clamwin/openssl
58 - name: Make it use the correct library
59 run: cp openssl/lib/mingw/x64/*.a openssl/lib/
60 - name: Build
61 run: ./installer.sh win64
62 - name: Rename
63 run: mv install-nossl.exe tewiinst64-nossl.exe && mv install-ssl.exe tewiinst64-ssl.exe
64 - name: Create a zipfile
65 run: zip -rv tewiinst64.zip tewiinst64-*.exe
66 - name: Upload artifact
67 uses: actions/upload-artifact@v4
68 with:
69 name: build-win64
70 path: tewiinst64.zip
71
72 release:
73 name: "Release"
74 runs-on: ubuntu-latest
75 if: ${{ !contains(github.event.head_commit.message, '[release') }}
76
77 permissions:
78 contents: write
79
80 needs: [build-win32, build-win64]
81
82 steps:
83 - name: Checkout
84 uses: actions/checkout@v4
85 - name: Download from build-win32
86 uses: actions/download-artifact@v4
87 with:
88 name: build-win32
89 - name: Download from build-win64
90 uses: actions/download-artifact@v4
91 with:
92 name: build-win64
93 - name: Extract
94 run: unzip tewiinst32.zip && unzip tewiinst64.zip
95 - name: Delete old release
96 run: gh release delete "$(make get-version)" --cleanup-tag -y || true
97 env:
98 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99 - name: Release
100 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"
101 env:
102 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Note: See TracBrowser for help on using the repository browser.