diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1160250..d757224 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/ci2.yml b/.github/workflows/ci2.yml new file mode 100644 index 0000000..e69de29