Skip to content

Merge branch 'main' of https://github.com/0xBLCKLPTN/Kingdom-System #2

Merge branch 'main' of https://github.com/0xBLCKLPTN/Kingdom-System

Merge branch 'main' of https://github.com/0xBLCKLPTN/Kingdom-System #2

Workflow file for this run

name: Update Version
on:
push:
branches:
- main
jobs:
update_version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get commit count and last commit hash
id: get_info
run: |
COMMIT_COUNT=$(git rev-list --count HEAD)
LAST_COMMIT_HASH=$(git rev-parse HEAD) # Получаем полный хеш
echo "total_commits=$COMMIT_COUNT" >> $GITHUB_ENV
echo "last_commit_hash=$LAST_COMMIT_HASH" >> $GITHUB_ENV
- name: Create VERSION file
run: |
echo "1.7.7_${{ env.last_commit_hash }}" > VERSION
- name: Commit and push changes
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git add VERSION
git commit -m "Update VERSION file"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}