Skip to content

Version File Management #1

Version File Management

Version File Management #1

Workflow file for this run

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