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