Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
benhall-7 committed Jan 5, 2025
1 parent 0b953e2 commit 954c145
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Package and Publish
on: # credit for much of this build system goes to hyperjson https://github.com/mre/hyperjson/
name: Package and publish
on:
release:
types: [created]
jobs:
Expand All @@ -11,23 +11,18 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install maturin
run: |
python -m pip install --upgrade pip
pip install maturin==0.13.7
- name: Build wheel
run: maturin build --release --strip
- name: Build
uses: PyO3/maturin-action@v1
with:
command: build
args: --release

# Note: Windows doesn't support glob
# https://stackoverflow.com/a/52481267/270334
Expand All @@ -47,8 +42,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: PyPi publish
- name: Publish to PyPi
uses: PyO3/maturin-action@v1
if: github.event_name == 'release' && github.event.action == 'created'
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: maturin publish --username __token__ --interpreter python${{matrix.python_version}}
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
with:
command: publish
args: --skip-existing
Empty file added .github/workflows/ci2.yml
Empty file.

0 comments on commit 954c145

Please sign in to comment.