forked from curl/curl
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from dongbeiouba/master
CI support release
- Loading branch information
Showing
2 changed files
with
128 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# 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-latest] | ||
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.2 | ||
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: | | ||
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.2 | ||
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: | | ||
./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 |