Skip to content

Commit

Permalink
Update CI.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SemyonSinchenko authored Oct 12, 2024
1 parent 0a3d486 commit 26729c3
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:

permissions:
contents: read
id-token: write

jobs:
linux:
Expand All @@ -40,6 +41,10 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Update version
if: "startsWith(github.ref, 'refs/tags/')"
run:
sed 's/version = ".*"/version = "${{ github.ref_name }}"/' Cargo.toml
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand Down Expand Up @@ -71,6 +76,10 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Update version
if: "startsWith(github.ref, 'refs/tags/')"
run:
sed 's/version = ".*"/version = "${{ github.ref_name }}"/' Cargo.toml
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand Down Expand Up @@ -99,6 +108,10 @@ jobs:
with:
python-version: 3.x
architecture: ${{ matrix.platform.target }}
- name: Update version
if: "startsWith(github.ref, 'refs/tags/')"
run:
sed 's/version = ".*"/version = "${{ github.ref_name }}"/' Cargo.toml
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand All @@ -125,6 +138,10 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Update version
if: "startsWith(github.ref, 'refs/tags/')"
run:
sed 's/version = ".*"/version = "${{ github.ref_name }}"/' Cargo.toml
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand Down Expand Up @@ -152,17 +169,15 @@ jobs:
name: wheels-sdist
path: dist

# release:
# name: Release
# runs-on: ubuntu-latest
# if: "startsWith(github.ref, 'refs/tags/')"
# needs: [linux, musllinux, windows, macos, sdist]
# steps:
# - uses: actions/download-artifact@v4
# - name: Publish to PyPI
# uses: PyO3/maturin-action@v1
# env:
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
# with:
# command: upload
# args: --non-interactive --skip-existing wheels-*/*
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, musllinux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*

0 comments on commit 26729c3

Please sign in to comment.