Skip to content

Commit

Permalink
upload macos artifacts to gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 authored Apr 6, 2024
1 parent 57bad46 commit bdf0439
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/build-and-test-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,23 @@ jobs:
python_bin=$(which python3)
sudo $python_bin -m pytest . --log-cli-level DEBUG --install-dir ${{ runner.temp }}/install --capture-interface ${{ matrix.capture_interface }}
# Upload pre-compiled binaries to GitHub releases page.
# Upload pre-compiled binaries to GitHub releases page and Github actions archives.
- name: Create tar release files for libcurl-impersonate
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ${{ runner.temp }}/install/lib
cd ${{ runner.temp }}/install/lib
ls -lah .
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
tar -c -z -f ${{ runner.temp }}/libcurl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz libcurl-impersonate*
echo "release_file_lib=${{ runner.temp }}/libcurl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz" >> $GITHUB_ENV
else
tar -c -z -f ${{ runner.temp }}/libcurl-impersonate.${{ matrix.host }}.tar.gz libcurl-impersonate*
fi
echo "release_file_lib=${{ runner.temp }}/libcurl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz" >> $GITHUB_ENV
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: libcurl-impersonate.${{ matrix.host }}.tar.gz
path: ${{ runner.temp }}/libcurl-impersonate*.tar.gz

- name: Clean build
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -365,9 +375,19 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ${{ runner.temp }}/install/bin
tar -c -z -f ${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz curl-impersonate-chrome curl_*
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
tar -c -z -f ${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz curl-impersonate-chrome curl_*
else
tar -c -z -f ${{ runner.temp }}/curl-impersonate.${{ matrix.host }}.tar.gz curl-impersonate-chrome curl_*
fi
echo "release_file_bin=${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz" >> $GITHUB_ENV
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: curl-impersonate.${{ matrix.host }}.tar.gz
path: ${{ runner.temp }}/curl-impersonate*.tar.gz

- name: Upload release files
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down

0 comments on commit bdf0439

Please sign in to comment.