Skip to content

Updating metadata file #2

Updating metadata file

Updating metadata file #2

Workflow file for this run

name: Bump version
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract version from file
id: getversion
run: |
pkg_name=$(grep -P 'version = \{attr = .*\}' pyproject.toml | grep -oP '\w+.__version__')
init_file="./code/${pkg_name//.__version__}/__init__.py"
new_tag=$(grep -Po '__version__ = "\K.*?(?=")' $init_file)
echo "::set-output name=version::$new_tag"
- name: Bump tag
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.getversion.outputs.version }}