From 58e91b42535331532715268ac05fe3c84f860ccc Mon Sep 17 00:00:00 2001 From: lwthiker Date: Fri, 3 Jun 2022 20:09:11 +0300 Subject: [PATCH 1/2] Upload precompiled libcurl impersonate on release Upload a tar file with libcurl-impersonate compiled for Ubuntu and macOS automatically for each GitHub release. Previously only a statically compiled version of the binary curl-impersonate was uploaded. --- .github/workflows/build-and-test-make.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-test-make.yml b/.github/workflows/build-and-test-make.yml index 5982d9c7..d86b1819 100644 --- a/.github/workflows/build-and-test-make.yml +++ b/.github/workflows/build-and-test-make.yml @@ -149,9 +149,16 @@ jobs: python_bin=$(which python3) sudo $python_bin -m pytest . --log-cli-level DEBUG --install-dir ${{ runner.temp }}/install --capture-interface ${{ matrix.capture_interface }} - # If it's a tag, create a release and upload the binaries. - # For that we recompile curl-impersonate statically. - - name: Recompile statically for release assets + # Upload pre-compiled binaries to GitHub releases page. + - name: Create tar release files for libcurl-impersonate + if: startsWith(github.ref, 'refs/tags/') + run: | + cd ${{ runner.temp }}/install/lib + tar -c -z -f ${{ runner.temp }}/libcurl-impersonate-${{ github.ref_name }}.${{ matrix.release_name }}.tar.gz libcurl-impersonate* + echo "release_file_lib=${{ runner.temp }}/libcurl-impersonate-${{ github.ref_name }}.${{ matrix.release_name }}.tar.gz" >> $GITHUB_ENV + + # Recompile curl-impersonate statically. + - name: Recompile statically if: startsWith(github.ref, 'refs/tags/') run: | ${{ matrix.make }} chrome-clean @@ -166,15 +173,17 @@ jobs: ${{ matrix.make }} firefox-checkbuild ${{ matrix.make }} firefox-install-strip - - name: Create tar release files + - name: Create tar release files for curl-impersonate if: startsWith(github.ref, 'refs/tags/') run: | cd ${{ runner.temp }}/install/bin tar -c -z -f ${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.release_name }}.tar.gz curl-impersonate-ff curl-impersonate-chrome curl_* - echo "release_file=${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.release_name }}.tar.gz" >> $GITHUB_ENV + echo "release_file_bin=${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.release_name }}.tar.gz" >> $GITHUB_ENV - name: Upload release files uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: ${{ env.release_file }} + files: | + ${{ env.release_file_lib }} + ${{ env.release_file_bin }} From ec2067cb4774946951a827608e55c56ffdd42f88 Mon Sep 17 00:00:00 2001 From: lwthiker Date: Fri, 3 Jun 2022 20:38:42 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 94cd85e8..0477daee 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Pre-compiled binaries for Linux and macOS (Intel) are available at the [GitHub r * Red Hat/Fedora/CentOS - `yum install nss nss-pem` * macOS - `brew install nss` -The pre-compiled binaries are statically compiled with libcurl(-impersonate) for ease of use. If you wish to use libcurl-impersonate, please build from source. +The pre-compiled binaries contain libcurl-impersonate and a statically compiled curl-impersonate for ease of use. ### Building from source See [INSTALL.md](INSTALL.md).