Updating versioning-workflow.yml #3
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: versioning-workflow | |
on: | |
push: | |
jobs: | |
versioning: | |
runs-on: ubuntu-latest | |
if: contains(github.event.pull_request.body, 'The workflow versioning-workflow was intentionally skipped.') == false | |
steps: | |
- uses: actions/checkout@master | |
- name: Write Version | |
run: | | |
cd src | |
rm -f version.txt | |
touch version.txt | |
echo "Version from the branch: ${GITHUB_REF_NAME}" >> version.txt | |
echo "Using the commit: $(git rev-parse --short "$GITHUB_SHA"): ${{ github.event.head_commit.message }}" >> version.txt | |
shell: bash | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "versioning pipeline" | |
git add -A | |
git commit -m "chore: writing version to version.txt" | |
git push |