mirror of
https://gh.wpcy.net/https://github.com/superdav42/wp-update-server-plugin.git
synced 2026-05-05 12:52:24 +08:00
20 lines
No EOL
564 B
YAML
20 lines
No EOL
564 B
YAML
name: Version Constant Check
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
validate-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Check Version Match
|
|
run: |
|
|
TAG_VERSION=${GITHUB_REF#refs/tags/v}
|
|
CODE_VERSION=$(php -r 'include "includes/Version.php"; echo Wpup_Version::VERSION;')
|
|
|
|
if [ "$TAG_VERSION" != "$CODE_VERSION" ]; then
|
|
echo "Version mismatch: Tag version ($TAG_VERSION) doesn't match Version.php ($CODE_VERSION)"
|
|
exit 1
|
|
fi |