(≧ω≦): upgrade OpenD version to 8.8.4818 #23
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: Create Tag | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
hook: | |
name: 'Create Tag' | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
# get version from pull request title | |
- id: parse | |
run: | | |
commit_message="${{ github.event.pull_request.title }}" | |
Version="${commit_message##*[[:space:]]}" # remove all characters before the last space | |
[[ "$commit_message" =~ ([0-9]+\.[0-9]+\.[0-9]+) ]] && Version="${BASH_REMATCH[1]}" || Version="" | |
echo "version=${Version}" | |
echo "version=${Version}" >> $GITHUB_OUTPUT | |
- name: Create Tag | |
if: ${{ steps.parse.outputs.version != '' }} | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git tag -a v${{ steps.parse.outputs.version }} -m "Upgrade to v${{ steps.parse.outputs.version }}" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
if: ${{ steps.parse.outputs.version != '' }} | |
with: | |
github_token: ${{ secrets.PAT_TOKEN }} # because github disable GITHUB_TOKEN push event | |
push_only_tags: true | |
force: true | |
tags: true |