GeezerVison is showing github.com — ci: adopt blueprint release pipeline (#61) · FBumann/xarray_plotly@fb728f2
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/ci.yml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 23 | 23 | run: uv python install ${{ matrix.python-version }} | 24 | 24 |
| 25 | 25 | - name: Install dependencies | 26 | | - run: uv sync --extra dev | | 26 | + run: uv sync --group dev | 27 | 27 |
| 28 | 28 | - name: Lint | 29 | 29 | run: uv run ruff check . | | 53 | 53 | uses: astral-sh/setup-uv@v7 | 54 | 54 |
| 55 | 55 | - name: Install dependencies | 56 | | - run: uv sync --extra docs | | 56 | + run: uv sync --group docs | 57 | 57 |
| 58 | 58 | - name: Build docs | 59 | 59 | run: uv run mkdocs build | |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/docs.yml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | branches: [main] | 8 | 8 | workflow_dispatch: # Manual trigger | 9 | 9 | workflow_run: | 10 | | - workflows: ["Release (Manual)", "Release Please"] | | 10 | + workflows: ["Publish"] | 11 | 11 | types: [completed] | 12 | 12 |
| 13 | 13 | permissions: | | 32 | 32 | uses: astral-sh/setup-uv@v7 | 33 | 33 |
| 34 | 34 | - name: Install dependencies | 35 | | - run: uv sync --extra docs | | 35 | + run: uv sync --group docs | 36 | 36 |
| 37 | 37 | - name: Build docs | 38 | 38 | run: uv run mkdocs build | |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/latest-deps.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 25 | 25 | run: uv python install ${{ matrix.python-version }} | 26 | 26 |
| 27 | 27 | - name: Install with latest dependencies | 28 | | - run: uv sync --extra dev --upgrade | | 28 | + run: uv sync --group dev --upgrade | 29 | 29 |
| 30 | 30 | - name: Test | 31 | 31 | run: uv run pytest --cov=xarray_plotly | |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/pr-title.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ name: PR Title Check | 2 | 2 |
| 3 | 3 | on: | 4 | 4 | pull_request: | 5 | | - types: [opened, edited, synchronize, reopened] | | 5 | + types: [opened, edited, reopened] | 6 | 6 |
| 7 | 7 | jobs: | 8 | 8 | validate: | |
Collapse file Copy file name to clipboard +71Lines changed: 71 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +name: Publish | | 2 | + | | 3 | +on: | | 4 | + push: | | 5 | + tags: ["v*"] | | 6 | + workflow_call: | | 7 | + inputs: | | 8 | + tag: | | 9 | + required: true | | 10 | + type: string | | 11 | + | | 12 | +concurrency: | | 13 | + group: publish-${{ inputs.tag || github.ref_name }} | | 14 | + cancel-in-progress: false | | 15 | + | | 16 | +permissions: | | 17 | + contents: write | | 18 | + id-token: write | | 19 | + attestations: write | | 20 | + | | 21 | +jobs: | | 22 | + publish: | | 23 | + name: Build & publish to PyPI | | 24 | + runs-on: ubuntu-24.04 | | 25 | + timeout-minutes: 10 | | 26 | + environment: | | 27 | + name: pypi | | 28 | + url: https://pypi.org/project/xarray_plotly | | 29 | + steps: | | 30 | + - uses: actions/checkout@v4 | | 31 | + with: | | 32 | + ref: ${{ inputs.tag || github.ref_name }} | | 33 | + fetch-depth: 0 | | 34 | + | | 35 | + - uses: astral-sh/setup-uv@v7 | | 36 | + with: | | 37 | + enable-cache: true | | 38 | + | | 39 | + - uses: actions/setup-python@v5 | | 40 | + with: | | 41 | + python-version: "3.12" | | 42 | + | | 43 | + - name: Build | | 44 | + run: uv build | | 45 | + | | 46 | + - uses: pypa/gh-action-pypi-publish@release/v1 | | 47 | + | | 48 | + github-release: | | 49 | + name: Create GitHub Release | | 50 | + needs: [publish] | | 51 | + if: github.event_name == 'push' && needs.publish.result == 'success' | | 52 | + runs-on: ubuntu-24.04 | | 53 | + steps: | | 54 | + - uses: actions/checkout@v4 | | 55 | + with: | | 56 | + ref: ${{ github.ref_name }} | | 57 | + | | 58 | + - name: Create GitHub Release | | 59 | + run: | | | 60 | + if gh release view "$TAG" &>/dev/null; then | | 61 | + echo "Release $TAG already exists, skipping." | | 62 | + exit 0 | | 63 | + fi | | 64 | + if [[ "$TAG" == *-* ]]; then | | 65 | + gh release create "$TAG" --generate-notes --prerelease | | 66 | + else | | 67 | + gh release create "$TAG" --generate-notes | | 68 | + fi | | 69 | + env: | | 70 | + GH_TOKEN: ${{ github.token }} | | 71 | + TAG: ${{ github.ref_name }} |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/publish.yml -43Lines changed: 0 additions & 43 deletions Collapse file Copy file name to clipboardExpand all lines: .github/workflows/release-please.yml -42Lines changed: 0 additions & 42 deletions Collapse file Copy file name to clipboardExpand all lines: .github/workflows/release.yaml +5-15Lines changed: 5 additions & 15 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -3,16 +3,6 @@ name: Release | 3 | 3 | on: | 4 | 4 | push: | 5 | 5 | branches: [main] | 6 | | - workflow_dispatch: | 7 | | - inputs: | 8 | | - branch: | 9 | | - description: Branch to create the release from | 10 | | - required: true | 11 | | - default: main | 12 | | - prerelease: | 13 | | - description: Create a pre-release | 14 | | - type: boolean | 15 | | - default: false | 16 | 6 |
| 17 | 7 | permissions: | 18 | 8 | contents: write | @@ -35,17 +25,17 @@ jobs: | 35 | 25 | - uses: googleapis/release-please-action@v4 | 36 | 26 | id: release | 37 | 27 | with: | | 28 | + token: ${{ steps.app-token.outputs.token }} | 38 | 29 | config-file: .release-please-config.json | 39 | 30 | manifest-file: .release-please-manifest.json | 40 | | - token: ${{ steps.app-token.outputs.token }} | 41 | | - target-branch: ${{ inputs.branch || github.ref_name }} | 42 | | - prerelease: ${{ inputs.prerelease }} | 43 | 31 |
| 44 | 32 | publish: | 45 | | - needs: [release-please] | | 33 | + needs: release-please | 46 | 34 | if: needs.release-please.outputs.release_created | 47 | 35 | permissions: | 48 | 36 | id-token: write | 49 | | - uses: ./.github/workflows/publish.yml | | 37 | + contents: write | | 38 | + attestations: write | | 39 | + uses: ./.github/workflows/publish.yaml | 50 | 40 | with: | 51 | 41 | tag: ${{ needs.release-please.outputs.tag_name }} |
Collapse file Copy file name to clipboard +18Lines changed: 18 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +version: 2 | | 2 | + | | 3 | +mkdocs: | | 4 | + configuration: mkdocs.yml | | 5 | + | | 6 | +build: | | 7 | + os: ubuntu-24.04 | | 8 | + tools: | | 9 | + python: "3.13" | | 10 | + jobs: | | 11 | + pre_create_environment: | | 12 | + - asdf plugin add uv | | 13 | + - asdf install uv latest | | 14 | + - asdf global uv latest | | 15 | + create_environment: | | 16 | + - uv venv "${READTHEDOCS_VIRTUALENV_PATH}" | | 17 | + install: | | 18 | + - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs |
Collapse file Copy file name to clipboardExpand all lines: pyproject.toml +10-9Lines changed: 10 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,15 +30,7 @@ Homepage = "https://github.com/FBumann/xarray_plotly" | 30 | 30 | Documentation = "https://fbumann.github.io/xarray_plotly" | 31 | 31 | Repository = "https://github.com/FBumann/xarray_plotly" | 32 | 32 |
| 33 | | -[project.optional-dependencies] | 34 | | -dev = [ | 35 | | - "pytest==9.0.2", | 36 | | - "pytest-cov==7.0.0", | 37 | | - "mypy==1.19.1", | 38 | | - "ruff==0.15.7", | 39 | | - "pre-commit==4.5.1", | 40 | | - "nbstripout==0.9.1", | 41 | | -] | | 33 | +[dependency-groups] | 42 | 34 | docs = [ | 43 | 35 | "mkdocs==1.6.1", | 44 | 36 | "mkdocs-material==9.7.6", | @@ -47,6 +39,15 @@ docs = [ | 47 | 39 | "mkdocs-plotly-plugin==0.1.3", | 48 | 40 | "jupyter==1.1.1", | 49 | 41 | ] | | 42 | +dev = [ | | 43 | + {include-group = "docs"}, | | 44 | + "pytest==9.0.2", | | 45 | + "pytest-cov==7.0.0", | | 46 | + "mypy==1.19.1", | | 47 | + "ruff==0.15.7", | | 48 | + "pre-commit==4.5.1", | | 49 | + "nbstripout==0.9.1", | | 50 | +] | 50 | 51 |
| 51 | 52 | [project.entry-points."xarray.backends"] | 52 | 53 | # Entry point for xarray to auto-register the accessor (xarray >= 2024.01) | |
|