Skip to content

Commit 2c81c31

Browse files
committed
Upgrade Github Actions dependencies and publish to test PyPi
1 parent 7be46f0 commit 2c81c31

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

.github/workflows/CI.yml

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
matrix:
2626
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
2727
steps:
28-
- uses: actions/checkout@v3
29-
- uses: actions/setup-python@v4
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-python@v5
3030
with:
3131
python-version: '3.10'
3232
- name: Build wheels
@@ -37,19 +37,19 @@ jobs:
3737
sccache: 'true'
3838
manylinux: auto
3939
- name: Upload wheels
40-
uses: actions/upload-artifact@v3
40+
uses: actions/upload-artifact@v4
4141
with:
42-
name: wheels
43-
path: dist
42+
name: wheels-${{ runner.os }}-${{ matrix.target }}
43+
path: dist/*
4444

4545
windows:
4646
runs-on: windows-latest
4747
strategy:
4848
matrix:
4949
target: [x64, x86]
5050
steps:
51-
- uses: actions/checkout@v3
52-
- uses: actions/setup-python@v4
51+
- uses: actions/checkout@v4
52+
- uses: actions/setup-python@v5
5353
with:
5454
python-version: '3.10'
5555
architecture: ${{ matrix.target }}
@@ -60,19 +60,19 @@ jobs:
6060
args: --release --out dist --find-interpreter
6161
sccache: 'true'
6262
- name: Upload wheels
63-
uses: actions/upload-artifact@v3
63+
uses: actions/upload-artifact@v4
6464
with:
65-
name: wheels
66-
path: dist
65+
name: wheels-${{ runner.os }}-${{ matrix.target }}
66+
path: dist/*
6767

6868
macos:
6969
runs-on: macos-latest
7070
strategy:
7171
matrix:
7272
target: [x86_64, aarch64]
7373
steps:
74-
- uses: actions/checkout@v3
75-
- uses: actions/setup-python@v4
74+
- uses: actions/checkout@v4
75+
- uses: actions/setup-python@v5
7676
with:
7777
python-version: '3.10'
7878
- name: Build wheels
@@ -82,35 +82,53 @@ jobs:
8282
args: --release --out dist --find-interpreter
8383
sccache: 'true'
8484
- name: Upload wheels
85-
uses: actions/upload-artifact@v3
85+
uses: actions/upload-artifact@v4
8686
with:
87-
name: wheels
88-
path: dist
87+
name: wheels-${{ runner.os }}-${{ matrix.target }}
88+
path: dist/*
8989

9090
sdist:
9191
runs-on: ubuntu-latest
9292
steps:
93-
- uses: actions/checkout@v3
93+
- uses: actions/checkout@v4
9494
- name: Build sdist
9595
uses: PyO3/maturin-action@v1
9696
with:
9797
command: sdist
9898
args: --out dist
9999
- name: Upload sdist
100-
uses: actions/upload-artifact@v3
100+
uses: actions/upload-artifact@v4
101101
with:
102-
name: wheels
103-
path: dist
102+
name: wheels-sdist
103+
path: dist/*
104+
105+
release-preview:
106+
name: Release Preview
107+
runs-on: ubuntu-latest
108+
needs: [linux, windows, macos, sdist]
109+
steps:
110+
- uses: actions/download-artifact@v4
111+
with:
112+
merge-multiple: true
113+
- name: check files
114+
run: ls -R
115+
- name: Publish to Test PyPI
116+
uses: PyO3/maturin-action@v1
117+
env:
118+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
119+
with:
120+
command: upload
121+
args: --repository="testpypi" --skip-existing *
104122

105123
release:
106124
name: Release
107125
runs-on: ubuntu-latest
108126
if: startsWith(github.ref, 'refs/tags/')
109127
needs: [linux, windows, macos, sdist]
110128
steps:
111-
- uses: actions/download-artifact@v3
129+
- uses: actions/download-artifact@v4
112130
with:
113-
name: wheels
131+
pattern: 'wheels-*'
114132
- name: Publish to PyPI
115133
uses: PyO3/maturin-action@v1
116134
env:

0 commit comments

Comments
 (0)