Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4248dcc
Make the releases automatic
GarethCabournDavies Jan 28, 2026
cc7c4e3
Update release instructions
GarethCabournDavies Jan 28, 2026
2415dd9
Update .github/workflows/distribution.yml
GarethCabournDavies Jan 28, 2026
d7b62d9
Update .github/actions/update-version/action.yml
GarethCabournDavies Jan 28, 2026
8ac6db1
use startsWith(github.ref, 'refs/tags') consistently
GarethCabournDavies Jan 28, 2026
66caf76
check if the release is from default branch, then bump development ve…
GarethCabournDavies Jan 29, 2026
0396bfe
(safety) Check if the next version is the one already in the repository
GarethCabournDavies Jan 29, 2026
2d22593
versioning match to PEP440
GarethCabournDavies Jan 29, 2026
e0c68bf
Float64 cast in map pixels sum (#5271)
pracchia Jan 29, 2026
79cc894
Change timeseries, frequencyseries epoch to be float64 rather than li…
GarethCabournDavies Jan 30, 2026
6a5a42d
I'm not sure that the version info is needed for the docker and CVMFS…
GarethCabournDavies Jan 30, 2026
db37214
try this other method for bumping the development version number
GarethCabournDavies Jan 30, 2026
e62088c
fixes to make docker build work
GarethCabournDavies Jan 30, 2026
e9a1fb6
Fix bump
GarethCabournDavies Jan 30, 2026
a949735
try to get docker build working
GarethCabournDavies Jan 30, 2026
eafaa4c
try this
GarethCabournDavies Jan 30, 2026
6bbb865
bump tp development version needs a permission
GarethCabournDavies Feb 2, 2026
c4a4434
Merge branch 'gwastro:master' into release_strategy
GarethCabournDavies Mar 5, 2026
d9b1a46
Merge branch 'gwastro:master' into release_strategy
GarethCabournDavies May 27, 2026
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
30 changes: 30 additions & 0 deletions .github/actions/update-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update Version in setup.py
description: "Updates release flag and version string in setup.py."

inputs:
version:
description: 'The version string to set.'
required: true
release:
description: 'The boolean state for the release flag (true/false).'
required: true

runs:
using: "composite"
steps:
- name: Update setup.py
shell: bash
run: |
# Convert release input to Python boolean (True/False)
RELEASE_BOOL=$(echo "${{ inputs.release }}" | awk '{print toupper(substr($0,1,1))tolower(substr($0,2))}')
python3 -c "
import sys, re
version = sys.argv[1]
release_flag = sys.argv[2]
with open('setup.py', 'r') as f:
content = f.read()
content = re.sub(r'^release = .*', f'release = {release_flag}', content, flags=re.MULTILINE)
content = re.sub(r'^version = .*', f\"version = '{version}'\", content, flags=re.MULTILINE)
Comment thread
GarethCabournDavies marked this conversation as resolved.
Outdated
with open('setup.py', 'w') as f:
f.write(content)
" "${{ inputs.version }}" "$RELEASE_BOOL"
57 changes: 57 additions & 0 deletions .github/workflows/distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set release version environment variable
if: startsWith(github.ref, 'refs/tags/v')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Update version file for release
if: startsWith(github.ref, 'refs/tags/v')
uses: ./.github/actions/update-version
with:
version: ${{ env.RELEASE_VERSION }}
release: 'true'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel
- name: Build wheels
Expand Down Expand Up @@ -51,6 +60,15 @@ jobs:
pattern: wheel-*
merge-multiple: true
path: dist/
- name: Set release version environment variable
if: startsWith(github.ref, 'refs/tags/v')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Update version file for release
if: startsWith(github.ref, 'refs/tags/v')
uses: ./.github/actions/update-version
with:
version: ${{ env.RELEASE_VERSION }}
release: 'true'
Comment thread
GarethCabournDavies marked this conversation as resolved.
- name: Build source distribution
run: |
python -c 'import setuptools ; print("setuptools version", setuptools.__version__)'
Expand All @@ -62,3 +80,42 @@ jobs:
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
password: ${{ secrets.pypi_password }}

bump_version:
name: Bump version to dev
needs: deploy_pypi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: master

Comment thread
GarethCabournDavies marked this conversation as resolved.
- name: Calculate and set next version
id: versioning
run: |
# Extract version from tag (e.g. v1.2.3 -> 1.2.3)
VERSION=${GITHUB_REF#refs/tags/v}
IFS='.' read -r -a parts <<< "$VERSION"
MAJOR=${parts[0]}
MINOR=${parts[1]}
PATCH=${parts[2]}
Comment thread
GarethCabournDavies marked this conversation as resolved.
NEXT_PATCH=$((PATCH + 1))
NEXT_VERSION="${MAJOR}.${MINOR}.dev${NEXT_PATCH}"
Comment thread
GarethCabournDavies marked this conversation as resolved.
Outdated
echo "next_version=${NEXT_VERSION}" >> $GITHUB_OUTPUT

- name: Update version to next dev
uses: ./.github/actions/update-version
with:
version: ${{ steps.versioning.outputs.next_version }}
release: 'false'

- name: Commit and push version bump
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add setup.py
git commit -m "Back to development: ${{ steps.versioning.outputs.next_version }}"
git push origin master
Comment thread
GarethCabournDavies marked this conversation as resolved.
Outdated
Loading