Skip to content

Updated versioning

Updated versioning #4

name: Version Logger
on: [push]
permissions:
contents: write
jobs:
update-version:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: true
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Configure git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Run update version script
id: update_version
run: python .github/workflows/version-logger.py
- name: Check for changes
id: check_changes
run: |
if git diff-index --quiet HEAD --; then
echo "changes=false" >> $GITHUB_ENV
else
echo "changes=true" >> $GITHUB_ENV
fi
- name: Commit and push changes
if: env.changes == 'true'
env:
ACTIONS_PAT: ${{ secrets.ACTIONS_PAT }}
run: |
git remote set-url origin https://x-access-token:${ACTIONS_PAT}@github.com/yonasuriv/panicsonda.git
git add --all
git commit -m "Automated commit: Version update"
git push origin protocol