Update hard-coded version #343
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 hard-coded version | |
on: workflow_dispatch | |
jobs: | |
update-version: | |
if: >- | |
${{ contains(github.ref, 'refs/heads/hotfix/v') || | |
contains(github.ref, 'refs/heads/release/v') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PUSH_TOKEN }} | |
- name: Set version | |
run: >- | |
echo "${{ github.ref_name }}" | | |
awk '{gsub(/.+\/v/,"version=");print;}' >> $GITHUB_ENV | |
- name: Save version | |
run: echo "${{ env.version }}" > version | |
- name: Commit & push changes | |
uses: EndBug/add-and-commit@v8 | |
with: | |
author_name: github-actions[bot] | |
author_email: github-actions[bot]@users.noreply.github.com | |
message: Update hard-coded version to v${{ env.version }} | |
add: version |