mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-24 02:51:28 -08:00
Bumps the minor-and-patches group with 5 updates: | Package | From | To | | --- | --- | --- | | [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) | `0.5.2` | `0.5.3` | | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `8.0.0` | `8.1.0` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.0` | `7.0.1` | | [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) | `8.1.0` | `8.1.1` | | [actions/cache](https://github.com/actions/cache) | `5.0.4` | `5.0.5` | Updates `zizmorcore/zizmor-action` from 0.5.2 to 0.5.3 - [Release notes](https://github.com/zizmorcore/zizmor-action/releases) - [Commits](https://github.com/zizmorcore/zizmor-action/compare/71321a20a9ded102f6e9ce5718a2fcec2c4f70d8...b1d7e1fb5de872772f31590499237e7cce841e8e) Updates `astral-sh/setup-uv` from 8.0.0 to 8.1.0 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/cec208311dfd045dd5311c1add060b2062131d57...08807647e7069bb48b6ef5acd8ec9567f424441b) Updates `actions/upload-artifact` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/bbbca2ddaa5d8feaa63e36b76fdaad77386f024f...043fb46d1a93c77aae656e7c1c64a875d1fc6a0a) Updates `peter-evans/create-pull-request` from 8.1.0 to 8.1.1 - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/c0f553fe549906ede9cf27b5156039d195d2ece0...5f6978faf089d4d20b00c7766989d076bb2fc7f1) Updates `actions/cache` from 5.0.4 to 5.0.5 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/668228422ae6a00e4ad889ee87cd7109ec5666a7...27d5ce7f107fe9357f9df03efb73ab90386fccae) --- updated-dependencies: - dependency-name: zizmorcore/zizmor-action dependency-version: 0.5.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patches - dependency-name: astral-sh/setup-uv dependency-version: 8.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patches - dependency-name: actions/upload-artifact dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patches - dependency-name: peter-evans/create-pull-request dependency-version: 8.1.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patches - dependency-name: actions/cache dependency-version: 5.0.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patches ... Signed-off-by: dependabot[bot] <[email protected]>
196 lines
6.0 KiB
YAML
196 lines
6.0 KiB
YAML
# Copyright 2024-2025 New Vector Ltd
|
||
# Copyright 2025-2026 Element Creations Ltd
|
||
#
|
||
# SPDX-License-Identifier: AGPL-3.0-only
|
||
|
||
name: Packages linting, testing & releasing
|
||
|
||
on:
|
||
pull_request:
|
||
push:
|
||
branches:
|
||
- main
|
||
- 'maintenance/*'
|
||
tags:
|
||
# Publish on any tag starting with a `v`, e.g., v0.1.0
|
||
- ess-migration-tool-v*
|
||
workflow_dispatch:
|
||
|
||
permissions:
|
||
contents: read
|
||
|
||
jobs:
|
||
python:
|
||
runs-on: ubuntu-latest
|
||
strategy:
|
||
matrix:
|
||
python-version:
|
||
- "3.11"
|
||
- "3.12"
|
||
- "3.13"
|
||
- "3.14"
|
||
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- name: Install uv
|
||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||
with:
|
||
enable-cache: true
|
||
activate-environment: true
|
||
python-version: ${{ matrix.python-version }}
|
||
|
||
- name: Set up UV environment
|
||
run: uv sync --all-packages --resolution lowest-direct
|
||
|
||
- name: Run ruff check
|
||
run: |
|
||
ruff check
|
||
|
||
- name: Run ruff format
|
||
run: |
|
||
ruff format --check
|
||
|
||
- name: mypy
|
||
run: |
|
||
mypy packages/ess-migration-tool
|
||
|
||
- name: pytest packages
|
||
run: |
|
||
pytest packages
|
||
|
||
- name: Build with lowest resolution
|
||
run: uv build --package ess-migration-tool
|
||
|
||
- name: pytest packages (wheel)
|
||
run: uv run --isolated --no-project --with dist/*.whl pytest packages/ess-migration-tool/tests
|
||
|
||
- name: pytest packages (source distribution)
|
||
run: uv run --isolated --no-project --with dist/*.tar.gz pytest packages/ess-migration-tool/tests
|
||
|
||
build:
|
||
runs-on: ubuntu-latest
|
||
needs:
|
||
- python
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- name: Install uv
|
||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||
with:
|
||
# We disable cache for releases to avoid cache poisoning
|
||
enable-cache: ${{ github.ref_type != 'tag' }}
|
||
activate-environment: true
|
||
|
||
- name: Set up UV environment
|
||
run: uv sync --all-packages --resolution lowest-direct
|
||
|
||
- name: Set version
|
||
env:
|
||
GITHUB_RUN_ID: "${{ github.run_id }}"
|
||
run: |
|
||
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
|
||
uv --directory packages/ess-migration-tool version "${GITHUB_REF_NAME#ess-migration-tool-v}"
|
||
else
|
||
uv version --directory packages/ess-migration-tool --bump "dev=$GITHUB_RUN_ID"
|
||
fi
|
||
|
||
- name: Build
|
||
run: uv build --package ess-migration-tool
|
||
# Check that basic features work and we didn't miss to include crucial files
|
||
- name: Smoke test (wheel)
|
||
run: uv run --isolated --resolution lowest --no-project --with dist/*.whl ess-migration-tool --help
|
||
- name: Smoke test (source distribution)
|
||
run: uv run --isolated --resolution lowest --no-project --with dist/*.tar.gz ess-migration-tool --help
|
||
|
||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||
with:
|
||
name: ess-migration-tool-dist
|
||
path: |
|
||
dist/*
|
||
retention-days: 1
|
||
|
||
|
||
publish:
|
||
needs:
|
||
- build
|
||
environment:
|
||
name: pypi
|
||
permissions:
|
||
id-token: write
|
||
contents: write
|
||
packages: read
|
||
pull-requests: write
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||
with:
|
||
# We are creating a commit changing the chart version for the next version PR
|
||
persist-credentials: true
|
||
|
||
- name: Grab packaged dists
|
||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||
with:
|
||
name: ess-migration-tool-dist
|
||
path: ./dist
|
||
|
||
- name: Install uv
|
||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||
with:
|
||
enable-cache: true
|
||
activate-environment: true
|
||
|
||
- name: Set up UV environment
|
||
run: uv sync
|
||
|
||
- name: Generate changelog
|
||
run: |
|
||
version=$(find dist -name 'ess_migration_tool-*.tar.gz' | sed 's/.*ess_migration_tool-//;s/.tar.gz//')
|
||
# Add changes to CHANGELOG.md
|
||
uv run towncrier build --version "$version" --yes --dir packages/ess-migration-tool
|
||
echo "CHANGELOG.md will look like:"
|
||
cat packages/ess-migration-tool/CHANGELOG.md
|
||
echo ""
|
||
|
||
- name: Bump version for next PR
|
||
id: versions
|
||
run: |
|
||
this_version=$(uv --directory packages/ess-migration-tool version --short)
|
||
uv --directory packages/ess-migration-tool version --bump patch --bump dev=1
|
||
next_version=$(uv --directory packages/ess-migration-tool version --short)
|
||
echo "this-version=$this_version" | tee -a "$GITHUB_OUTPUT"
|
||
echo "next-version=$next_version" | tee -a "$GITHUB_OUTPUT"
|
||
|
||
- name: Publish
|
||
env:
|
||
REF_TYPE: ${{ github.ref_type }}
|
||
run: |
|
||
if [ "${REF_TYPE}" = "tag" ]; then
|
||
uv publish dist/*
|
||
else
|
||
uv publish --dry-run dist/*
|
||
fi
|
||
|
||
- name: Create PR for next patch version
|
||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
||
if: github.ref_type == 'tag'
|
||
with:
|
||
branch: "gha/bump-ess-migration-tool-to-${{ steps.versions.outputs.next-version }}"
|
||
base: "main"
|
||
commit-message: "Bump ess-migration-tool version to ${{ steps.versions.outputs.next-version }}"
|
||
title: "Bump ess-migration-tool version to ${{ steps.versions.outputs.next-version }} after release"
|
||
labels: automated,version-bump
|
||
body: |
|
||
${{ steps.versions.outputs.this-version }} has just been released.
|
||
This PR prepares ess-migration-tool package for the next release:
|
||
${{ steps.versions.outputs.next-version }}.
|
||
|
||
The target branch may be wrong. In which case this PR should be taken over and manually adjusted.
|