Skip to content

Commit bd9335b

Browse files
committed
Add dry-run publish workflow
1 parent d142ff0 commit bd9335b

File tree

2 files changed

+43
-5
lines changed

2 files changed

+43
-5
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Dry-run Publish
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
# TODO: remove
8+
pull_request:
9+
branches: [main]
10+
11+
jobs:
12+
build_wheels:
13+
# TODO: switch to main
14+
uses: dottxt-ai/outlines-core/.github/workflows/build_wheels.yml@maturin
15+
16+
dry_run:
17+
needs: build_wheels
18+
name: Dry-run for publishing to PyPI and crates.io
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- uses: actions/download-artifact@v4
24+
with:
25+
pattern: wheels-*
26+
merge-multiple: true
27+
path: dist
28+
29+
- uses: actions/download-artifact@v4
30+
with:
31+
name: sdist
32+
path: dist
33+
34+
- uses: dtolnay/rust-toolchain@master
35+
with:
36+
toolchain: stable
37+
- uses: Swatinem/rust-cache@v2
38+
39+
- name: Dry-run publish to crates.io
40+
run: cargo publish --dry-run

.github/workflows/release_pypi.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ name: Release PyPi
22

33
on:
44
workflow_dispatch:
5-
# release:
6-
# types:
7-
# - created
8-
pull_request:
9-
branches: [main]
5+
release:
6+
types:
7+
- created
108

119
jobs:
1210
build_wheels:

0 commit comments

Comments
 (0)