Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
onlypuppy7 committed Oct 6, 2024
2 parents a3d4fae + 45fb6ef commit 948dac7
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update Version and Commit Hash

on:
push:
branches:
- main

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
- 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

0 comments on commit 948dac7

Please sign in to comment.