8
8
tags :
9
9
- " *"
10
10
pull_request :
11
+ workflow_dispatch :
11
12
12
13
# Allow one concurrent deployment
13
14
concurrency :
@@ -86,18 +87,14 @@ jobs:
86
87
linux :
87
88
name : build linux
88
89
runs-on : ubuntu-latest
89
- if : " startsWith(github.ref, 'refs/tags/') "
90
+ needs : [test]
90
91
steps :
91
92
- uses : actions/checkout@v3
92
- - uses : PyO3/maturin-action@v1.31.0
93
+ - uses : PyO3/maturin-action@v1.40.1
93
94
with :
94
95
manylinux : auto
95
96
command : build
96
97
args : --release --sdist -o dist --find-interpreter
97
- # Pin rust toolchain, so it won't install 1.65.0, otherwise get this error:
98
- # Attempting to include the sdist output tarball dist/egglog-0.1.0.tar.gz into itself! Check 'cargo package --list' output.
99
- # https://github.com/metadsl/egglog-python/actions/runs/3388178229/jobs/5629843303
100
- rust-toolchain : " 1.64.0"
101
98
- name : Upload wheels
102
99
uses : actions/upload-artifact@v2
103
100
with :
@@ -107,10 +104,10 @@ jobs:
107
104
windows :
108
105
name : build windows
109
106
runs-on : windows-latest
110
- if : " startsWith(github.ref, 'refs/tags/') "
107
+ needs : [test]
111
108
steps :
112
109
- uses : actions/checkout@v3
113
- - uses : PyO3/maturin-action@v1.31.0
110
+ - uses : PyO3/maturin-action@v1.40.1
114
111
with :
115
112
command : build
116
113
args : --release -o dist --find-interpreter
@@ -123,10 +120,10 @@ jobs:
123
120
macos :
124
121
name : build macos
125
122
runs-on : macos-latest
126
- if : " startsWith(github.ref, 'refs/tags/') "
123
+ needs : [test]
127
124
steps :
128
125
- uses : actions/checkout@v3
129
- - uses : PyO3/maturin-action@v1.31.0
126
+ - uses : PyO3/maturin-action@v1.40.1
130
127
with :
131
128
command : build
132
129
args : --release -o dist --universal2 --find-interpreter
@@ -139,14 +136,14 @@ jobs:
139
136
release :
140
137
name : Release
141
138
runs-on : ubuntu-latest
142
- if : " startsWith(github.ref, 'refs/tags/')"
139
+ if : startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch')
143
140
needs : [macos, windows, linux]
144
141
steps :
145
142
- uses : actions/download-artifact@v2
146
143
with :
147
144
name : wheels
148
145
- name : Publish to PyPI
149
- uses : PyO3/maturin-action@v1.31.0
146
+ uses : PyO3/maturin-action@v1.40.1
150
147
env :
151
148
MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
152
149
with :
0 commit comments