File tree Expand file tree Collapse file tree 5 files changed +64
-125
lines changed
Expand file tree Collapse file tree 5 files changed +64
-125
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3131 name : sdist
3232 path : dist
3333
34+ - name : List downloaded artifacts
35+ run : ls -lh dist/
36+
3437 - uses : dtolnay/rust-toolchain@master
3538 with :
3639 toolchain : stable
Original file line number Diff line number Diff line change 1+ name : Publish PyPi & crates.io
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : " Release tag"
8+ required : true
9+ release :
10+ types :
11+ - created
12+
13+ jobs :
14+ build_wheels :
15+ # TODO: switch to main
16+ uses : dottxt-ai/outlines-core/.github/workflows/build_wheels.yml@maturin
17+ with :
18+ auto_bump : true
19+
20+ release :
21+ needs : build_wheels
22+ name : Publish PyPI and crates.io
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v3
26+
27+ - uses : actions/download-artifact@v4
28+ with :
29+ pattern : wheels-*
30+ merge-multiple : true
31+ path : dist
32+
33+ - uses : actions/download-artifact@v4
34+ with :
35+ name : sdist
36+ path : dist
37+
38+ - uses : dtolnay/rust-toolchain@master
39+ with :
40+ toolchain : stable
41+ - uses : Swatinem/rust-cache@v2
42+
43+ - name : Bump version in Cargo.toml
44+ uses : ./.github/actions/bump_version
45+
46+ - name : Dry-run publish to crates.io
47+ run : cargo publish --dry-run
48+
49+ - name : Publish to PyPI
50+ uses : PyO3/maturin-action@v1
51+ env :
52+ MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_SECRET}}
53+ with :
54+ command : upload
55+ args : --non-interactive --skip-existing dist/*
56+
57+ - name : Publish to crates.io
58+ env :
59+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
60+ # We need --allow-dirty since we dynamically change the version in Cargo.toml
61+ run : cargo publish --allow-dirty
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments