Skip to content

Commit

Permalink
adjust publish workflow so that it's called by the 'build' workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aSemy committed Jul 17, 2023
1 parent 1336150 commit 3a64438
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,9 @@ jobs:
with:
gradle-home-cache-cleanup: true
arguments: build --stacktrace

publish:
# only publish after 'build' was successful, and this workflow is running on master branch
needs: build
if: github.ref == 'refs/heads/master'
uses: ./.github/workflows/publish.yml
7 changes: 2 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
name: Publish
on:
workflow_run:
workflows: [ "Build" ]
types:
- completed
workflow_dispatch:
workflow_call:

concurrency:
group: "${{ github.workflow }}"
cancel-in-progress: false

jobs:
maven-publish:
if: ${{ (github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }}
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: macos-latest # macOS supports building all Kotlin targets

permissions:
Expand Down

0 comments on commit 3a64438

Please sign in to comment.