Subversion Repositories Tewi

Rev

Rev 203 | Rev 263 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
106 nishi 1
# $Id$
2
 
3
name: "Build Tewi HTTPd"
4
 
5
on:
6
  workflow_dispatch:
7
  push:
8
 
9
concurrency:
10
  group: "build"
11
  cancel-in-progress: true
12
 
13
jobs:
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
107 nishi 25
      run: sudo apt-get install nsis mingw-w64
108 nishi 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/
106 nishi 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
107 nishi 53
      run: sudo apt-get install nsis mingw-w64
108 nishi 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/
106 nishi 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
204 nishi 73
    if: ${{ contains(github.event.head_commit.message, '[release') }}
106 nishi 74
 
75
    permissions:
76
      contents: write
77
 
108 nishi 78
    needs: [build-win32, build-win64]
106 nishi 79
 
80
    steps:
81
    - name: Checkout
82
      uses: actions/checkout@v4
83
    - name: Download from build-win32
84
      uses: actions/download-artifact@v4
85
      with:
86
        name: build-win32
87
    - name: Download from build-win64
88
      uses: actions/download-artifact@v4
89
      with:
90
        name: build-win64
91
    - name: Extract
92
      run: unzip tewiinst32.zip && unzip tewiinst64.zip
93
    - name: Delete old release
94
      run: gh release delete "$(make get-version)" --cleanup-tag -y || true
95
      env:
96
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97
    - name: Release
98
      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"
99
      env:
100
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}