Skip to content

Merge branch 'main' of github.com:lawndoc/stack-back #8

Merge branch 'main' of github.com:lawndoc/stack-back

Merge branch 'main' of github.com:lawndoc/stack-back #8

Workflow file for this run

name: "Bump Version Tag"
on:
push:
branches:
- main
paths-ignore:
- .gitignore
- README.MD
- LICENSE
- docs/
- src/restic_compose_backup/__init__.py # version bumps
workflow_dispatch:
jobs:
bump-tag:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Get next version
id: version
uses: anothrNick/[email protected]
env:
WITH_V: true
DEFAULT_BUMP: patch
DRY_RUN: true
- name: Bump version in files
run: |
version="${{ steps.version.outputs.new_tag }}"
clean_version="${version#v}"
sed -i "s/__version__ = .*/__version__ = \"${clean_version}\"/" src/restic_compose_backup/__init__.py
sed -i "s/release = .*/release = \"${clean_version}\"/" docs/conf.py
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: automated version bump
- name: Push version tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
CUSTOM_TAG: ${{ steps.version.outputs.new_tag }}