Skip to content

Commit

Permalink
Merge pull request #812 from afuetterer/802-build-wheel-in-ci
Browse files Browse the repository at this point in the history
ci: add build-wheel job
  • Loading branch information
afuetterer authored Nov 21, 2023
2 parents 874b917 + 7966a28 commit 5304eb2
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 @@ -130,6 +130,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/dev${PR_NUMBER}-py3-none-any}"
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 @@ -170,6 +199,7 @@ jobs:
- lint
- test
- coveralls
- build-wheel
- dev-setup
- optional-dependencies
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 5304eb2

Please sign in to comment.