v2.2.0-stable #4
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: Update Version Number | |
on: | |
release: | |
types: [published] | |
jobs: | |
update-version-number: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Update Files With New Version Number | |
run: | | |
sed -i "/version/c\ \"version\": \"${GITHUB_REF##*/}\"," composer.json | |
- name: Commit Changes To Target And Release Branches | |
run: | | |
echo "Current tag is " ${GITHUB_REF##*/} | |
echo "Target branch is ${{github.event.release.target_commitish}}" | |
git config --global user.name 'ground-creative' | |
git config --global user.email 'irony00100@gmail.com' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git commit -am "ci: update version to ${GITHUB_REF##*/}" | |
git push origin HEAD:${{github.event.release.target_commitish}} | |
git tag -f -a ${GITHUB_REF##*/} -m "ci: update version to ${GITHUB_REF##*/}" | |
git push origin -f ${GITHUB_REF##*/} |