File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616jobs :
1717
18+ check-publish :
19+ name : check publish
20+ runs-on : ubuntu-latest
21+ outputs :
22+ BUILD_VERSION : ${{ env.BUILD_VERSION }}
23+ BUILD_SNAPSHOT : ${{ env.BUILD_SNAPSHOT }}
24+ BUILD_PUBLISH : ${{ env.BUILD_PUBLISH }}
25+
26+ steps :
27+ - name : get version
28+ id : get-version
29+ uses : openapi-processor/openapi-processor-base/.github/actions/version@main
30+ with :
31+ version-file : ' gradle/libs.versions.toml'
32+ version-path : ' versions.processor'
33+
34+ - name : set version outputs
35+ shell : bash
36+ run : |
37+ echo BUILD_VERSION="${{steps.get-version.outputs.version}}" >> $GITHUB_ENV
38+ echo BUILD_SNAPSHOT="${{steps.get-version.outputs.snapshot}}" >> $GITHUB_ENV
39+ echo BUILD_PUBLISH="${{steps.get-version.outputs.publish}}" >> $GITHUB_ENV
40+ cat $GITHUB_ENV
41+
1842 test :
1943 name : test
2044
@@ -49,12 +73,11 @@ jobs:
4973 path : build/reports
5074
5175 publish :
52- if : ${{ github.actor == 'hauner' }}
53-
54- needs : [test]
76+ needs : [check-publish, test]
5577 name : publish snapshot
5678
5779 runs-on : ubuntu-latest
80+ if : needs.check-publish.outputs.BUILD_PUBLISH == 'true'
5881
5982 steps :
6083 - name : checkout
You can’t perform that action at this time.
0 commit comments