Skip to content

Commit

Permalink
Upload prepublished releases to test.pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
hohav committed Jul 30, 2024
1 parent 0a2f126 commit 67ac5c6
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: Python
on:
push:
branches:
- main
- ci-test
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
release:
types: [prereleased]
jobs:
macos:
runs-on: macos-latest
Expand All @@ -23,7 +19,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: universal2-apple-darwin
args: --release --out dist
args: --release --out dist --sdist
- name: Install wheels
run: |
pip install dist/peppi_py-*.whl --force-reinstall
Expand All @@ -33,6 +29,12 @@ jobs:
with:
name: wheels-${{ github.job }}-${{ matrix.target }}
path: dist
- name: Upload release assets
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: dist/*
windows:
runs-on: windows-latest
strategy:
Expand Down Expand Up @@ -61,6 +63,12 @@ jobs:
with:
name: wheels-${{ github.job }}-${{ matrix.target }}
path: dist
- name: Upload release assets
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: dist/*
linux:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -121,3 +129,28 @@ jobs:
with:
name: wheels-${{ github.job }}-${{ matrix.target }}
path: dist
- name: Upload release assets
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: dist/*
release:
name: Release
runs-on: ubuntu-latest
needs: [macos, windows, linux, linux-cross]
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
pip install --upgrade twine
twine upload --repository testpypi --skip-existing *

0 comments on commit 67ac5c6

Please sign in to comment.