Skip to content

Commit f5473e5

Browse files
authored
chore: prepare all before publish (#4397)
I pinky promised that only renamed steps and moved them around so all the publishes are last. --------- Signed-off-by: Daniel King <[email protected]>
1 parent c1e897a commit f5473e5

File tree

1 file changed

+63
-57
lines changed

1 file changed

+63
-57
lines changed

.github/workflows/publish.yml

Lines changed: 63 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,6 @@ on:
88
types: [published]
99

1010
jobs:
11-
publish-rust:
12-
runs-on: ubuntu-latest
13-
timeout-minutes: 120
14-
needs: [prepare-python, prepare-java-macos, prepare-java-linux]
15-
steps:
16-
- uses: actions/checkout@v5
17-
with:
18-
fetch-depth: 0
19-
20-
- uses: ./.github/actions/setup-rust
21-
22-
- name: Cargo Set Version
23-
run: |
24-
cargo install cargo-edit
25-
cargo set-version --workspace ${{ github.event.release.tag_name || github.event.inputs.version }}
26-
27-
- name: Release
28-
run: |
29-
cargo +nightly publish -Zpublish-timeout --no-verify --allow-dirty --workspace \
30-
--exclude bench-vortex \
31-
--exclude vortex-python \
32-
--exclude vortex-duckdb \
33-
--exclude vortex-ffi \
34-
--exclude vortex-fuzz \
35-
--exclude vortex-jni \
36-
--exclude xtask
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
40-
4111
prepare-python:
4212
runs-on: ${{ matrix.target.runs-on }}
4313
timeout-minutes: 120
@@ -99,32 +69,6 @@ jobs:
9969
name: "wheels-${{ matrix.target.target }}.zip"
10070
path: dist/
10171

102-
publish-python:
103-
needs: [prepare-python]
104-
runs-on: ubuntu-latest
105-
timeout-minutes: 120
106-
permissions:
107-
id-token: write # IMPORTANT: mandatory for trusted publishing
108-
environment:
109-
name: push-to-pypi
110-
url: https://pypi.org/p/vortex-data
111-
steps:
112-
- uses: actions/download-artifact@v5
113-
with:
114-
pattern: wheels-*.zip
115-
# https://github.com/actions/download-artifact?tab=readme-ov-file#download-all-artifacts
116-
# "To download them to the same directory:"
117-
path: dist/
118-
merge-multiple: true
119-
- name: Display structure of downloaded files
120-
run: ls -R dist/
121-
- name: Publish to PyPI
122-
uses: pypa/gh-action-pypi-publish@release/v1
123-
with:
124-
attestations: true
125-
verbose: true
126-
skip-existing: true # Idempotent releases
127-
12872
prepare-java-macos:
12973
runs-on: "macos-latest"
13074
steps:
@@ -184,8 +128,70 @@ jobs:
184128
retention-days: 1
185129
if-no-files-found: error
186130

131+
prepare-all:
132+
needs: [prepare-python, prepare-java-macos, prepare-java-linux]
133+
runs-on: ubuntu-latest
134+
steps:
135+
- run: echo built # GitHub requires at least one step.
136+
137+
publish-rust:
138+
runs-on: ubuntu-latest
139+
timeout-minutes: 120
140+
needs: [prepare-all]
141+
steps:
142+
- uses: actions/checkout@v5
143+
with:
144+
fetch-depth: 0
145+
146+
- uses: ./.github/actions/setup-rust
147+
148+
- name: Cargo Set Version
149+
run: |
150+
cargo install cargo-edit
151+
cargo set-version --workspace ${{ github.event.release.tag_name || github.event.inputs.version }}
152+
153+
- name: Release
154+
run: |
155+
cargo +nightly publish -Zpublish-timeout --no-verify --allow-dirty --workspace \
156+
--exclude bench-vortex \
157+
--exclude vortex-python \
158+
--exclude vortex-duckdb \
159+
--exclude vortex-ffi \
160+
--exclude vortex-fuzz \
161+
--exclude vortex-jni \
162+
--exclude xtask
163+
env:
164+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
165+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
166+
167+
publish-python:
168+
needs: [prepare-all]
169+
runs-on: ubuntu-latest
170+
timeout-minutes: 120
171+
permissions:
172+
id-token: write # IMPORTANT: mandatory for trusted publishing
173+
environment:
174+
name: push-to-pypi
175+
url: https://pypi.org/p/vortex-data
176+
steps:
177+
- uses: actions/download-artifact@v5
178+
with:
179+
pattern: wheels-*.zip
180+
# https://github.com/actions/download-artifact?tab=readme-ov-file#download-all-artifacts
181+
# "To download them to the same directory:"
182+
path: dist/
183+
merge-multiple: true
184+
- name: Display structure of downloaded files
185+
run: ls -R dist/
186+
- name: Publish to PyPI
187+
uses: pypa/gh-action-pypi-publish@release/v1
188+
with:
189+
attestations: true
190+
verbose: true
191+
skip-existing: true # Idempotent releases
192+
187193
publish-java:
188-
needs: [prepare-java-macos, prepare-java-linux]
194+
needs: [prepare-all]
189195
runs-on: ubuntu-latest
190196
timeout-minutes: 120
191197
env:

0 commit comments

Comments
 (0)