Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish

on:
workflow_dispatch:
inputs:
tag:
description: 'Release tag to publish (e.g. v0.0.15)'
required: true
type: string
workflow_call:
inputs:
tag:
required: true
type: string

jobs:
publish:
name: Build & publish to PyPI
runs-on: ubuntu-24.04
timeout-minutes: 10
environment:
name: pypi
url: https://pypi.org/project/xarray_plotly
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.tag }}
fetch-depth: 0

- uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Build
run: uv build

- uses: pypa/gh-action-pypi-publish@release/v1
27 changes: 3 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,10 @@ jobs:
prerelease: ${{ inputs.prerelease }}

publish:
name: Build & publish to PyPI
needs: [release-please]
if: needs.release-please.outputs.release_created
runs-on: ubuntu-24.04
timeout-minutes: 10
environment:
name: pypi
url: https://pypi.org/project/xarray_plotly
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ needs.release-please.outputs.tag_name }}
fetch-depth: 0

- uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Build
run: uv build

- uses: pypa/gh-action-pypi-publish@release/v1
uses: ./.github/workflows/publish.yml
with:
tag: ${{ needs.release-please.outputs.tag_name }}