Skip to content

Commit

Permalink
[ci] Use pixi for building; Debug testpypi deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
anjos committed Nov 6, 2024
1 parent d5c9209 commit bd43656
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 24 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
retry: true
linksToSkip: https://pypi.org/project/pelican-pybtex/
- name: Set up Python ${{ matrix.python-version }} & Pixi
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.34.0
Expand Down Expand Up @@ -63,21 +63,24 @@ jobs:
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python
uses: actions/setup-python@v5
- name: Setup pixi
uses: prefix-dev/setup-[email protected]
with:
python-version: 3.x
- name: Install pypa/build
run: python3 -m pip install build --user
pixi-version: v0.34.0
cache: true
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
run: pixi run -e build build
- name: Check distribution
run: pixi run -e build check
- name: Store distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
name: Publish Python distribution to TestPyPI
name: Publish to TestPyPI
needs:
- build
runs-on: ubuntu-latest
Expand All @@ -95,9 +98,10 @@ jobs:
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
repository-url: https://test.pypi.org/legacy/
publish-to-pypi:
name: Publish distribution to PyPI
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
Expand All @@ -116,7 +120,7 @@ jobs:
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: Sign distribution and upload it to GitHub Release
name: Publish to GitHub Releases
needs:
- publish-to-pypi
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit bd43656

Please sign in to comment.