Skip to content

Commit

Permalink
Fix Release Drafter
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkudrna committed Oct 8, 2020
1 parent e205827 commit f440838
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/release-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build_and_test:
runs-on: ubuntu-18.04
outputs:
version_changed: steps.check_package_version.outputs.changed
version_changed: ${{ steps.check_package_version.outputs.changed }}
steps:
- name: Clone repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -43,6 +43,14 @@ jobs:
id: check_package_version
uses: EndBug/version-check@v1

- name: Log when version changed
if: steps.check_package_version.outputs.changed == 'true'
run: 'echo "Version change found in commit ${{ steps.check_package_version.outputs.commit }}! New version: ${{ steps.check_package_version.outputs.version }} (${{ steps.check_package_version.outputs.type }})"'

- name: Log when version unchanged
if: steps.check_package_version.outputs.changed != 'true'
run: 'echo "No version change"'

- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
Expand All @@ -51,7 +59,7 @@ jobs:

update_release_draft:
needs: [build_and_test]
if: needs.build_and_test.outputs.version_changed == 'false'
if: needs.build_and_test.outputs.version_changed != 'true'
runs-on: ubuntu-18.04
steps:
- name: Draft release on GitHub
Expand All @@ -60,7 +68,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish_release_draft_on_version_bump:
needs: [build_and_test, update_release_draft]
needs: [build_and_test]
if: needs.build_and_test.outputs.version_changed == 'true'
runs-on: ubuntu-18.04
steps:
Expand Down

0 comments on commit f440838

Please sign in to comment.