Skip to content

Commit

Permalink
Update build.yml to include build number,
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenDufresne authored Dec 19, 2023
1 parent 031aea3 commit 1c44af1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1c44af1

Please sign in to comment.