Skip to content

Commit

Permalink
Increment setuppy version (#576)
Browse files Browse the repository at this point in the history
* add a new action to update the version on a release

* better regex

* clean up actions for out of date terra workflow

* update action

* initial read me

* update setup with regex guardrails
  • Loading branch information
RoriCremer authored Oct 19, 2024
1 parent 6f6e61b commit 3ced397
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 109 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Release process


For PRs and after merge, testing is run with:
[python-package.yml](python-package.yml)



Manually navigate to GitHub's Releases page and select Draft a new release.
https://github.com/broadinstitute/ml4h/releases

This process should automatically kick off the following workflows

Creation of updated docker images on CPU and GPU base images and published in GCR and GHCR
[publish-to-gcr-ghcr.yml](publish-to-gcr-ghcr.yml)

Images are named:
tf2.9-latest-cpu
tf2.9-latest-gpu
And can be found on [GitHubs Container Registry](https://github.com/broadinstitute/ml4h/pkgs/container/ml4h)

Updating of ml4h library and published to Pypi
[publish-to-pypi.yml](publish-to-pypi.yml)



79 changes: 0 additions & 79 deletions .github/workflows/docker-publish.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/increment-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Increment version

on:
release:
types: [published]

permissions:
contents: write

jobs:
update_version:
if: ${{ github.event.release.tag_name != '' }}
name: Update version
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4

- name: Checkout main for version edit
run: |
# Note: the following account information will not work on GHES
git config --global user.name "github-actions[bot]"
git config --global user.email {user.id}+{user.login}@users.noreply.github.com
git fetch
git checkout main
- name: Replace string in file
run: |
grep "version" setup.py
if [[ ${{ github.event.release.tag_name }} =~ [v0-9.]* ]]; then
sed -i "s/version='[v0-9.]*',/version='${{ github.event.release.tag_name }}',/g" setup.py
else
echo "Tag is an unexpected value and no version uodate will occur"
fi
- name: Check for version update
run: cat setup.py

- name: Push to git
run: |
git add setup.py
git commit -m "Version bump to ${{ github.event.release.tag_name }}'"
git push
18 changes: 0 additions & 18 deletions docker/terra_image/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions docker/terra_image/README.md

This file was deleted.

0 comments on commit 3ced397

Please sign in to comment.