-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/onlypuppy7/LegacyShell
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |