1
+ # Copyright (C) 2023
2
+ #
3
+ # SPDX-License-Identifier: curl
4
+
5
+ name : release
6
+
7
+ on :
8
+ workflow_dispatch :
9
+ tags :
10
+ - ' *'
11
+
12
+ jobs :
13
+ new_release :
14
+ runs-on : ubuntu-latest
15
+ outputs :
16
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
17
+ steps :
18
+ - name : Create Release
19
+ id : create_release
20
+ uses : actions/create-release@v1
21
+ env :
22
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
23
+ with :
24
+ tag_name : ${{ github.ref }}
25
+ release_name : Release ${{ github.ref }}
26
+ body : |
27
+ Changes in this Release
28
+ - First Change
29
+ - Second Change
30
+ draft : true
31
+ prerelease : true
32
+ build_linux_macos :
33
+ runs-on : ${{ matrix.builder }}
34
+ needs : [new_release]
35
+ strategy :
36
+ matrix :
37
+ builder : [macos-latest, ubuntu-20.04]
38
+ name : " build-${{ matrix.builder }}"
39
+ steps :
40
+ - run : brew install libtool autoconf automake pkg-config
41
+ if : ${{ matrix.builder == 'macos-latest' }}
42
+ - name : build Tongsuo
43
+ run : |
44
+ VERSION=8.3.3
45
+ wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${VERSION}.tar.gz"
46
+ tar zxf "${VERSION}.tar.gz"
47
+ pushd "Tongsuo-${VERSION}"
48
+ ./config --prefix=${GITHUB_WORKSPACE}/tongsuo no-shared enable-ntls --release
49
+ make -s -j4
50
+ make install_sw
51
+ popd
52
+ - uses : actions/checkout@v2
53
+ with :
54
+ path : curl
55
+ fetch-depth : 0
56
+ - name : build curl
57
+ working-directory : ./curl
58
+ run : |
59
+ git apply tongsuo.patch
60
+ autoreconf -fi
61
+ ./configure --enable-warnings --enable-werror --with-openssl=${GITHUB_WORKSPACE}/tongsuo --without-zlib --without-brotli --disable-shared --disable-ldap --disable-ldaps --disable-rtsp --without-librtmp --enable-static
62
+ make -s -j4
63
+
64
+ - name : upload artifact
65
+ uses : actions/upload-release-asset@v1
66
+ env :
67
+ GITHUB_TOKEN : ${{ github.token }}
68
+ with :
69
+ upload_url : ${{ needs.new_release.outputs.upload_url }}
70
+ asset_path : ./curl/src/curl
71
+ asset_name : curl-${{ runner.os }}
72
+ asset_content_type : application/octet-stream
73
+
74
+ build_windows :
75
+ runs-on : windows-latest
76
+ needs : [new_release]
77
+ steps :
78
+ - run : choco install -y winrar
79
+ - uses : ilammy/msvc-dev-cmd@v1
80
+ with :
81
+ arch : win64
82
+ - uses : ilammy/setup-nasm@v1
83
+ with :
84
+ platform : win64
85
+ - uses : shogo82148/actions-setup-perl@v1
86
+ - name : Export env
87
+ shell : bash
88
+ run : |
89
+ VERSION=8.3.3
90
+ echo "TONGSUO_VERSION=${VERSION}" >> $GITHUB_ENV
91
+ echo "TONGSUO_HOME=${GITHUB_WORKSPACE}\tongsuo${VERSION}" >> $GITHUB_ENV
92
+ - name : Download Tongsuo source
93
+ run : |
94
+ wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${env:TONGSUO_VERSION}.tar.gz" -OutFile "${env:TONGSUO_VERSION}.tar.gz"
95
+ shell : powershell
96
+ - run : ' "C:\Program Files\WinRAR\WinRAR.exe" -INUL x %TONGSUO_VERSION%.tar.gz'
97
+ shell : cmd
98
+ - name : Build Tongsuo
99
+ shell : cmd
100
+ run : |
101
+ pushd "Tongsuo-%TONGSUO_VERSION%"
102
+ mkdir _build
103
+ pushd _build
104
+ perl ..\Configure no-makedepend no-shared VC-WIN64A --prefix=%TONGSUO_HOME%
105
+ nmake /S
106
+ nmake install_sw
107
+ popd
108
+ popd
109
+ - uses : actions/checkout@v2
110
+ with :
111
+ path : curl
112
+ fetch-depth : 0
113
+ - name : build curl
114
+ working-directory : ./curl
115
+ shell : powershell
116
+ run : |
117
+ git apply tongsuo.diff
118
+ ./buildconf.bat
119
+ cd winbuild
120
+ nmake /f Makefile.vc mode=static WITH_SSL=static SSL_PATH=${env:TONGSUO_HOME} RTLIBCFG=static
121
+ - name : upload artifact
122
+ uses : actions/upload-release-asset@v1
123
+ env :
124
+ GITHUB_TOKEN : ${{ github.token }}
125
+ with :
126
+ upload_url : ${{ needs.new_release.outputs.upload_url }}
127
+ asset_path : .\curl\builds\libcurl-vc-x64-release-static-ssl-static-ipv6-sspi\bin\curl.exe
128
+ asset_name : curl-${{ runner.os }}.exe
129
+ asset_content_type : application/octet-stream
0 commit comments