v1.2.14_02152024 #36
Workflow file for this run
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
name: On Release | |
on: | |
release: | |
branches: [ "main" ] | |
types: [published, prereleased] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.TOKEN_FOR_ONCHANGE }} | |
- name: Update version.txt | |
run: | | |
echo "Version= ${GITHUB_REF_NAME}" > caper/version.txt | |
echo "Creator= ${GITHUB_ACTOR}" >> caper/version.txt | |
NOW=`date` | |
echo "Date= ${NOW}" >> caper/version.txt | |
COMMIT_ID=`git rev-parse HEAD` | |
echo "CommitID=${COMMIT_ID}" >> caper/version.txt | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Auto-Update version.txt on release | |
push_options: '--force' | |
branch: main | |
- name: move tag on version.txt to our updated one | |
run: | | |
git tag -f ${GITHUB_REF_NAME} | |
git push -f --tags |