Skip to content

Commit a23df5c

Browse files
FBumannclaude
andauthored
ci: extract publish workflow for manual releases (#60)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 92fcdaa commit a23df5c

File tree

2 files changed

+46
-24
lines changed

2 files changed

+46
-24
lines changed

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Release tag to publish (e.g. v0.0.15)'
8+
required: true
9+
type: string
10+
workflow_call:
11+
inputs:
12+
tag:
13+
required: true
14+
type: string
15+
16+
jobs:
17+
publish:
18+
name: Build & publish to PyPI
19+
runs-on: ubuntu-24.04
20+
timeout-minutes: 10
21+
environment:
22+
name: pypi
23+
url: https://pypi.org/project/xarray_plotly
24+
permissions:
25+
id-token: write
26+
steps:
27+
- uses: actions/checkout@v6
28+
with:
29+
ref: ${{ inputs.tag }}
30+
fetch-depth: 0
31+
32+
- uses: astral-sh/setup-uv@v7
33+
with:
34+
enable-cache: true
35+
36+
- uses: actions/setup-python@v6
37+
with:
38+
python-version: "3.12"
39+
40+
- name: Build
41+
run: uv build
42+
43+
- uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,10 @@ jobs:
4242
prerelease: ${{ inputs.prerelease }}
4343

4444
publish:
45-
name: Build & publish to PyPI
4645
needs: [release-please]
4746
if: needs.release-please.outputs.release_created
48-
runs-on: ubuntu-24.04
49-
timeout-minutes: 10
50-
environment:
51-
name: pypi
52-
url: https://pypi.org/project/xarray_plotly
5347
permissions:
5448
id-token: write
55-
steps:
56-
- uses: actions/checkout@v6
57-
with:
58-
ref: ${{ needs.release-please.outputs.tag_name }}
59-
fetch-depth: 0
60-
61-
- uses: astral-sh/setup-uv@v7
62-
with:
63-
enable-cache: true
64-
65-
- uses: actions/setup-python@v6
66-
with:
67-
python-version: "3.12"
68-
69-
- name: Build
70-
run: uv build
71-
72-
- uses: pypa/gh-action-pypi-publish@release/v1
49+
uses: ./.github/workflows/publish.yml
50+
with:
51+
tag: ${{ needs.release-please.outputs.tag_name }}

0 commit comments

Comments
 (0)