mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-08-10 18:59:25 +00:00
Add compiled binaries to GitHub releases
This commit is contained in:
36
.github/workflows/build-and-test-make.yml
vendored
36
.github/workflows/build-and-test-make.yml
vendored
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -23,9 +25,11 @@ jobs:
|
|||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
capture_interface: eth0
|
capture_interface: eth0
|
||||||
make: make
|
make: make
|
||||||
|
release_name: x86_64-linux-gnu
|
||||||
- os: macos-11
|
- os: macos-11
|
||||||
capture_interface: en0
|
capture_interface: en0
|
||||||
make: gmake
|
make: gmake
|
||||||
|
release_name: x86_64-macos
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v3
|
- uses: actions/setup-python@v3
|
||||||
|
|
||||||
@@ -143,4 +147,34 @@ jobs:
|
|||||||
cd tests
|
cd tests
|
||||||
# sudo is needed for capturing packets
|
# sudo is needed for capturing packets
|
||||||
python_bin=$(which python3)
|
python_bin=$(which python3)
|
||||||
sudo $python_bin -m pytest . --log-cli-level DEBUG --install-dir ${{ runner.temp}}/install --capture-interface ${{ matrix.capture_interface }}
|
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
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
run: |
|
||||||
|
${{ matrix.make }} chrome-clean
|
||||||
|
${{ matrix.make }} firefox-clean
|
||||||
|
rm -Rf ${{ runner.temp }}/install
|
||||||
|
mkdir ${{ runner.temp }}/install
|
||||||
|
./configure --prefix=${{ runner.temp }}/install --enable-static
|
||||||
|
${{ matrix.make }} chrome-build
|
||||||
|
${{ matrix.make }} chrome-checkbuild
|
||||||
|
${{ matrix.make }} chrome-install
|
||||||
|
${{ matrix.make }} firefox-build
|
||||||
|
${{ matrix.make }} firefox-checkbuild
|
||||||
|
${{ matrix.make }} firefox-install
|
||||||
|
|
||||||
|
- name: Create tar release files
|
||||||
|
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
|
||||||
|
|
||||||
|
- name: Upload release files
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: ${{ env.release_file }}
|
||||||
|
12
Makefile.in
12
Makefile.in
@@ -73,6 +73,11 @@ firefox-uninstall: ## Uninstall the Firefox version of curl-impersonate after 'm
|
|||||||
rm -Rf @bindir@/curl_ff*
|
rm -Rf @bindir@/curl_ff*
|
||||||
.PHONY: firefox-uninstall
|
.PHONY: firefox-uninstall
|
||||||
|
|
||||||
|
firefox-clean: ## Clean build artifacts of the Firefox version. Use after re-running './configure'
|
||||||
|
cd $(CURL_VERSION)
|
||||||
|
$(MAKE) clean MAKEFLAGS=
|
||||||
|
rm .firefox
|
||||||
|
|
||||||
chrome-build: $(CURL_VERSION)/.chrome ## Build the Chrome version of curl-impersonate
|
chrome-build: $(CURL_VERSION)/.chrome ## Build the Chrome version of curl-impersonate
|
||||||
cd $(CURL_VERSION)
|
cd $(CURL_VERSION)
|
||||||
# Don't pass this Makefile's MAKEFLAGS
|
# Don't pass this Makefile's MAKEFLAGS
|
||||||
@@ -102,7 +107,12 @@ chrome-uninstall: ## Uninstall the Chrome version of curl-impersonate after 'mak
|
|||||||
rm -Rf @bindir@/curl_chrome* @bindir@/curl_edge* @bindir@/curl_safari*
|
rm -Rf @bindir@/curl_chrome* @bindir@/curl_edge* @bindir@/curl_safari*
|
||||||
.PHONY: chrome-uninstall
|
.PHONY: chrome-uninstall
|
||||||
|
|
||||||
clean: ## Remove build artifacts
|
chrome-clean: ## Clean build artifacts of the Chrome version. Use after re-running './configure'
|
||||||
|
cd $(CURL_VERSION)
|
||||||
|
$(MAKE) clean MAKEFLAGS=
|
||||||
|
rm .chrome
|
||||||
|
|
||||||
|
clean: ## Remove all build artifacts, including dependencies
|
||||||
rm -Rf brotli-$(BROTLI_VERSION).tar.gz brotli-$(BROTLI_VERSION)
|
rm -Rf brotli-$(BROTLI_VERSION).tar.gz brotli-$(BROTLI_VERSION)
|
||||||
rm -Rf $(NSS_VERSION).tar.gz $(NSS_VERSION)
|
rm -Rf $(NSS_VERSION).tar.gz $(NSS_VERSION)
|
||||||
rm -Rf boringssl.zip boringssl
|
rm -Rf boringssl.zip boringssl
|
||||||
|
Reference in New Issue
Block a user