Version File Management #1
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: Version File Management | |
on: | |
release: | |
types: [published] | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update Version File | |
run: | | |
VERSION=${GITHUB_REF#refs/tags/v} | |
echo "<?php | |
class Wpup_Version { | |
public const VERSION = '$VERSION'; | |
}" > includes/Version.php | |
- name: Commit Version Update | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add includes/Version.php | |
git commit -m "chore: Update version to ${GITHUB_REF#refs/tags/v}" | |
git push |