Skip to content
Open
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
27 changes: 27 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[tool.bumpversion]
current_version = "1.0.1"
commit = true
tag = false
tag_name = "v{new_version}"
tag_message = "Release version {new_version}"
message = "bump: version {current_version} → {new_version}"

[[tool.bumpversion.files]]
filename = "src/cpg_flow/__init__.py"
search = "__version__ = '{current_version}'"
replace = "__version__ = '{new_version}'"

[[tool.bumpversion.files]]
filename = "Dockerfile"
search = "# VERSION {current_version}"
replace = "# VERSION {new_version}"

[[tool.bumpversion.files]]
filename = ".github/workflows/docker.yaml"
search = "VERSION: {current_version}"
replace = "VERSION: {new_version}"

[[tool.bumpversion.files]]
filename = ".github/workflows/test.yaml"
search = "VERSION: {current_version}"
replace = "VERSION: {new_version}"
82 changes: 82 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
version: 2

# Multi-ecosystem groups for Python dependencies
multi-ecosystem-groups:
python-minor-patch:
applies-to: version-updates
update-types:
- "minor"
- "patch"
python-major:
applies-to: version-updates
update-types:
- "major"

updates:
# pip ecosystem for pyproject.toml dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
multi-ecosystem-group: python-minor-patch
commit-message:
prefix: "chore"
include: "scope"
ignore:
# Don't update hail - pinned at CPG's installed version
- dependency-name: "hail"
# Don't update Python version
- dependency-name: "python"
open-pull-requests-limit: 10

# uv ecosystem for uv.lock file
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
multi-ecosystem-group: python-minor-patch
commit-message:
prefix: "chore"
include: "scope"
ignore:
# Don't update hail - pinned at CPG's installed version
- dependency-name: "hail"
# Don't update Python version
- dependency-name: "python"
open-pull-requests-limit: 10

# Separate update for major versions (pip)
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
multi-ecosystem-group: python-major
commit-message:
prefix: "chore"
include: "scope"
ignore:
# Don't update hail - pinned at CPG's installed version
- dependency-name: "hail"
# Don't update Python version
- dependency-name: "python"
# Ignore minor and patch updates (handled by the other group)
- update-types: ["version-update:semver-minor", "version-update:semver-patch"]
open-pull-requests-limit: 10

# Separate update for major versions (uv)
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
multi-ecosystem-group: python-major
commit-message:
prefix: "chore"
include: "scope"
ignore:
# Don't update hail - pinned at CPG's installed version
- dependency-name: "hail"
# Don't update Python version
- dependency-name: "python"
# Ignore minor and patch updates (handled by the other group)
- update-types: ["version-update:semver-minor", "version-update:semver-patch"]
open-pull-requests-limit: 10
58 changes: 0 additions & 58 deletions .github/renovate-config.json

This file was deleted.

79 changes: 34 additions & 45 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Package
name: Package and Release
on:
push:
branches:
- main
- alpha

workflow_dispatch:
inputs:
Expand All @@ -16,9 +15,9 @@
permissions: {}

jobs:
package:
name: Package
if: startsWith(github.event.head_commit.message, 'bump:') != true
release:
name: Release
if: startsWith(github.event.head_commit.message, 'bump:')
environment: production
permissions:
id-token: write
Expand All @@ -29,45 +28,29 @@
shell: bash -l {0}

steps:
- name: Setup | Force correct release branch on workflow sha
env:
REPO: ${{ github.repository }}
REF_NAME: ${{ github.ref_name }}
SHA: ${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git clone https://github.com/${REPO} .
git checkout -B "${REF_NAME}" "${SHA}"
git config user.name "cpg-software-ci-bot"
git config user.email "software-team+githubcibot@populationgenomics.org.au"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}"

- name: Action | Semantic Version Release
id: release
uses: python-semantic-release/python-semantic-release@0dc72ac9058a62054a45f6344c83a423d7f906a8 #v9.21.1
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
root_options: '-v'
git_committer_email: 'software-team+githubcibot@populationgenomics.org.au'
git_committer_name: 'cpg-software-ci-bot'
github_token: ${{ secrets.BOT_ACCESS_TOKEN }}
fetch-depth: 0
Comment on lines +31 to +34

Check warning

Code scanning / zizmor

does not set persist-credentials: false Warning

does not set persist-credentials: false

- name: Build on no release
if: steps.release.outputs.released != 'true'
- name: Extract version from commit message
id: version
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
echo "No release was made, manual build"
make ci-build
# Extract version from commit message like "bump: version 1.0.1 → 1.0.2"
VERSION=$(echo "$COMMIT_MESSAGE" | grep -oP '→ \K[0-9]+\.[0-9]+\.[0-9]+')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Detected version: $VERSION"

- name: Publish | Upload package to PyPI
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc #v1.12.4
if: steps.release.outputs.released == 'true' || github.event.inputs.force_pypi_release == 'true'

- name: Publish | Upload to GitHub Release Assets
uses: python-semantic-release/publish-action@1aa9f41fac5d531e6764e1991b536783337f3a56 #v9.21.1
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.BOT_ACCESS_TOKEN }}
tag: ${{ steps.release.outputs.tag }}
- name: Create and push tag
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "v${VERSION}" -m "Release version ${VERSION}"
git push origin "v${VERSION}"

- name: Install uv
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca #v6.0.1
Expand All @@ -78,12 +61,18 @@
run: |
uv sync

- run: uv pip install mike

- name: Clean stale build metadata
- name: Build package
run: |
rm -rf src/*.egg-info || true
uv build --sdist --wheel

- name: Publish | Upload package to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e #v1.13.0
if: github.event_name == 'push' || github.event.inputs.force_pypi_release == 'true'

- name: Publish | Update docs version
env:
VERSION: ${{ steps.version.outputs.version }}
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
run: |
uv run mike deploy -F docs/mkdocs.yml --push --update-aliases ${{ steps.release.outputs.tag }} latest
uv run mike deploy -F docs/mkdocs.yml --push --update-aliases "${VERSION}" latest
35 changes: 0 additions & 35 deletions .github/workflows/renovate.yaml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/web-docs.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,3 @@ repos:
# rev: v1.1.400
# hooks:
# - id: pyright

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.22.0
hooks:
- id: commitlint
stages: [commit-msg]
args: [--config, .commitlintrc.json]
additional_dependencies: ['@commitlint/config-conventional']
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM australia-southeast1-docker.pkg.dev/analysis-runner/images/driver:latest
# VERSION 1.0.1
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Set up working directory for the project
Expand Down
Loading
Loading