Skip to content

Merge branch 'main' of https://github.com/onlypuppy7/LegacyShell #288

Merge branch 'main' of https://github.com/onlypuppy7/LegacyShell

Merge branch 'main' of https://github.com/onlypuppy7/LegacyShell #288

Workflow file for this run

name: Update Version and Commit Hash
on:
push:
branches:
- main
permissions:
contents: write
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Increment version number
run: |
version_file="versionEnum.txt"
version=$(cat $version_file)
new_version=$((version + 1))
echo $new_version > $version_file
echo "new_version=$new_version" >> $GITHUB_ENV
- name: Update commit hash
run: |
hash_file="versionHash.txt"
commit_hash=$(git rev-parse HEAD)
echo $commit_hash > $hash_file
- name: Commit changes
run: |
git add versionEnum.txt versionHash.txt
git commit -m "Increment version to $new_version and update commit hash"
git push
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin main