Skip to content

Commit

Permalink
try to build
Browse files Browse the repository at this point in the history
  • Loading branch information
kivel committed Dec 19, 2024
1 parent 981f2df commit 4adba2f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/_dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
workflow_call:

jobs:
build:
runs-on: "ubuntu-latest"

steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Need this to get version number from last tag
fetch-depth: 0

- name: Build sdist and wheel
run: >
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) &&
pipx run build
- name: Upload sdist and wheel as artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist

- name: Check for packaging errors
run: pipx run twine check --strict dist/*

# - name: Install produced wheel
# uses: ./.github/actions/install_requirements
# with:
# pip-install: dist/*.whl

# - name: Test module --version works using the installed wheel
# # If more than one module in src/ replace with module name to test
# run: python -m $(ls --hide='*.egg-info' src | head -1) --version
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ jobs:
with:
runs-on: ${{ matrix.runs-on }}
python-version: ${{ matrix.python-version }}

dist:
needs: check
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_dist.yml

0 comments on commit 4adba2f

Please sign in to comment.