Skip to content

Commit

Permalink
Fix release version check (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdef authored Oct 1, 2024
1 parent 9cfa3c6 commit 1d9090e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Release
on:
workflow_run:
workflows: [Test]
branches: [trunk]
types: [completed]
push:
branches:
- trunk

jobs:
check_and_release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -17,7 +15,7 @@ jobs:
- name: Check for version change
id: version_check
run: |
OLD_VERSION=$(git show origin/trunk:remote-data-blocks.php | sed -n 's/.*Version: *//p' | tr -d '[:space:]')
OLD_VERSION=$(git show HEAD^:remote-data-blocks.php | sed -n 's/.*Version: *//p' | tr -d '[:space:]')
NEW_VERSION=$(git show HEAD:remote-data-blocks.php | sed -n 's/.*Version: *//p' | tr -d '[:space:]')
if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 1d9090e

Please sign in to comment.