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: - uses: actions/checkout@v4 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@v9 with: author_name: github-actions[bot] author_email: github-actions[bot]@users.noreply.github.com message: Update hard-coded version to ${{ env.version }} add: version