Skip to content

Commit

Permalink
build: Add sdist artifact to release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cauliyang committed Oct 24, 2023
1 parent 9906f19 commit 80ec97a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ jobs:
pip install --constraint=.github/workflows/constraints.txt poetry
poetry --version
- name: Build sdist
run: |
poetry build --format=sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

- name: Check if there is a parent commit
id: check-parent-commit
run: |
Expand Down Expand Up @@ -59,7 +67,7 @@ jobs:
matrix:
os: [ubuntu-latest]
cibw_build: ["cp39-*", "cp310-*", "cp311-*"]
cibw_archs: ["x86_64", "i686", "aarch64", "ppc64le"]
cibw_archs: ["x86_64", "aarch64"]

steps:
- name: Check out repository
Expand Down Expand Up @@ -92,7 +100,7 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_ALL: apt update && apt install -q --no-install-recommends --no-install-suggests libhts-dev libssl-dev
CIBW_BEFORE_ALL: (yum install -y libhts-dev libssl-dev || apt-get update && apt install -q --no-install-recommends --no-install-suggests libhts-dev libssl-dev)
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_TEST_REQUIRES: pytest
Expand Down Expand Up @@ -171,6 +179,7 @@ jobs:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true
packages_dir: artifact/

- name: Publish package on TestPyPI
if: "! needs.release.check-version.outputs.tag"
Expand All @@ -180,6 +189,7 @@ jobs:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
packages_dir: artifact/

- name: Publish the release notes
uses: release-drafter/[email protected]
Expand Down

0 comments on commit 80ec97a

Please sign in to comment.