Skip to content

Commit

Permalink
ci: fix packaging workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoAria committed Nov 13, 2023
1 parent 89e6190 commit 52c9dd4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{matrix.python-version}}
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Build package
run: poetry build
- name: Build wheel
run: poetry build --format wheel

# Conditionally build sdist
- name: Build sdist
if: matrix.python-version == '3.8'
run: poetry build --format sdist

- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{secrets.PYPI_TOKEN}}
password: ${{ secrets.PYPI_TOKEN }}
14 changes: 10 additions & 4 deletions .github/workflows/testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,22 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{matrix.python-version}}
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Build package
run: poetry build
- name: Build wheel
run: poetry build --format wheel

# Conditionally build sdist
- name: Build sdist
if: matrix.python-version == '3.8'
run: poetry build --format sdist

- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{secrets.TESTPYPI_TOKEN}}
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

0 comments on commit 52c9dd4

Please sign in to comment.