Skip to content

Test

Test #32

Workflow file for this run

# This workflow will update a version number each time a new version of grand/dataio/root_trees.py is pushed
name: Versioning test
on:
push:
paths:
- grand/dataio/root_trees.py
jobs:
Version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Get version number
id: get-version
env:
USER_GIT: ${{github.actor}}
SONAR_L: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/get_version.py >> "$GITHUB_OUTPUT"
# - name: Update version number
# id: update-version
# env:
# USER_GIT: ${{github.actor}}
# SONAR_L: ${{ secrets.GITHUB_TOKEN }}
# run: |
# python scripts/update_version.py >> "$GITHUB_OUTPUT"
- name: get version
run: echo "${{ steps.get-version.outputs.version}}"
- name: Push Git Tag
run: |
git tag 'root_v'${{ steps.get-version.outputs.version}}
git push origin 'root_v'${{ steps.get-version.outputs.version}}
# - name: Commit version
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: Automatic update to version "${{ steps.update-version.outputs.version}}"
# branch: ${{ github.ref }}
# tagging_message: 'root_v${{ steps.update-version.outputs.version}}'
# push_options: --force