Skip to content

Updating versioning-workflow.yml #3

Updating versioning-workflow.yml

Updating versioning-workflow.yml #3

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