Skip to content

Update HELICS Version #29

Update HELICS Version

Update HELICS Version #29

Workflow file for this run

name: Update HELICS Version
on:
workflow_dispatch:
inputs:
version:
description: 'HELICS version number (without leading `v` prefix)'
required: true
type: string
dryrun:
description: 'Do a dry run of the update process, without making the commit'
required: false
type: boolean
jobs:
update-helics-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set git config for commits
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Update HELICS version number
run: |
# Update lines in the package file
version_line="__version__ = \"v${{ inputs.version }}\""
echo "::group::__version__ line"
echo "$version_line"
echo "::endgroup::"
sed -i "/__version__ =/c ${version_line}" helics/_version.py
git add helics/_version.py
echo "::group::git diff --staged"
git diff --staged
echo "::endgroup::"
git commit -m "build(release): Bump to v${{ inputs.version }}"
echo "::group::git show"
git show
echo "::endgroup::"
if [ "${{ inputs.dryrun }}" = "false" ]; then
echo "Pushing changes"
git push
fi