Bump version to 1.18.0 #11
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: Create Tag | |
on: | |
push: | |
branches: | |
- develop | |
permissions: | |
contents: write | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
WANTED_MESSAGE: 'Bump version to ' | |
jobs: | |
create: | |
if: ${{ startsWith( github.event.head_commit.message, 'Bump version to ' ) }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.WF_TOKEN }} | |
- name: Get new version | |
shell: bash | |
run: | | |
COMMIT_MESSAGE="${{ env.COMMIT_MESSAGE }}" | |
WANTED_MESSAGE="${{ env.WANTED_MESSAGE }}" | |
VERSION="${COMMIT_MESSAGE/$WANTED_MESSAGE}" | |
VERSION="${VERSION#v}" | |
VERSION="${VERSION#V}" | |
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Git tag version | |
run: | | |
echo "Tagging version $NEW_VERSION" | |
git tag "v$NEW_VERSION" | |
git push --tags |