diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9774869..cd55d61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,12 @@ jobs: run: | git add source/wp-content/themes/wporg-documentation-2022/build --force + - name: Append build number to version + run: | + current_version=$(grep -oP 'Version: \K[0-9]+\.[0-9]+\.[0-9]+' source/wp-content/themes/wporg-documentation-2022/style.css) + new_version="${current_version}-${GITHUB_SHA::7}" + sed -i "s/Version: $current_version/Version: $new_version/" source/wp-content/themes/wporg-documentation-2022/style.css + - name: Commit and push uses: actions-js/push@a52398fac807b0c1e5f1492c969b477c8560a0ba # 1.3 with: