Skip to content

Commit

Permalink
ci: add build-wheel job
Browse files Browse the repository at this point in the history
  • Loading branch information
afuetterer committed Nov 3, 2023
1 parent 457d19d commit c6ef0b5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,35 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-wheel:
name: Build python wheel
needs: test
runs-on: ubuntu-22.04
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm install
- run: npm run build:prod
- uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: pip
- run: python -m pip install --upgrade build pip setuptools wheel
- run: python -m build --wheel
- run: |
PR_NUMBER=${{ github.event.pull_request.number }}
WHL_FILE=$(ls dist/*.whl)
NEW_NAME="${WHL_FILE/-py3-none-any/-pr-${PR_NUMBER}}"
mv "$WHL_FILE" "$NEW_NAME"
- uses: actions/upload-artifact@v3
with:
name: wheel
path: dist/*.whl

dev-setup:
# Ref: structlog (MIT licensed) <https://github.com/hynek/structlog/blob/main/.github/workflows/ci.yml>
name: "Test dev setup on ${{ matrix.os }}"
Expand Down Expand Up @@ -160,6 +189,7 @@ jobs:
- lint
- test
- coveralls
- build-wheel
- dev-setup
- optional-dependencies
- webpack-build
Expand Down

0 comments on commit c6ef0b5

Please sign in to comment.