Skip to content

Commit

Permalink
Fix manylinux
Browse files Browse the repository at this point in the history
  • Loading branch information
GCS-ZHN committed Jan 26, 2023
1 parent 36feeff commit b1360ba
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
tags:
- 'v*'

permissions:
contents: write

jobs:
linux-build:
runs-on: ubuntu-18.04
Expand All @@ -27,7 +30,7 @@ jobs:
run: "which python && which pip"

- name: "Setup build"
run: "pip install build"
run: "pip install build auditwheel==5.0.0"

- name: "Install zlib"
run : "sudo apt install zlib1g-dev -y"
Expand All @@ -41,20 +44,43 @@ jobs:
- name: "Test case"
run: pushd test; python test.py; popd

- name: "Repair manylinux"
run: |
auditwheel show dist/*-linux*whl &&
auditwheel repair dist/*-linux*whl --plat manylinux_2_27_x86_64 -w dist &&
rm dist/*-linux*whl
- name: Get version
id: version
uses: frabert/replace-string-action@v2
with:
pattern: 'refs/tags/v(.+)'
string: ${{ github.ref }}
replace-with: 'v$1'

- uses: actions/upload-artifact@v3
with:
name: build_package
name: build_${{ steps.version.outputs.replaced }}
path: dist/*
retention-days: 1

release:
needs: ["linux-build"]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3

- name: Get version
id: version
uses: frabert/replace-string-action@v2
with:
pattern: 'refs/tags/v(.+)'
string: ${{ github.ref }}
replace-with: 'v$1'

- uses: actions/download-artifact@v3
with:
name: build_package
name: build_${{ steps.version.outputs.replaced }}
path: dist/

- name: Release to GitHub
Expand Down

0 comments on commit b1360ba

Please sign in to comment.