Subversion Repositories Tewi

Rev

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