Skip to content

Commit 51bbb70

Browse files
committed
ci: test snapshot
1 parent 3b8260b commit 51bbb70

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

.github/workflows/build.yaml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
outputs:
2222
BUILD_VERSION: ${{ env.BUILD_VERSION }}
23+
BUILD_SNAPSHOT: ${{ env.BUILD_SNAPSHOT }}
2324

2425
steps:
2526
- name: get version
@@ -32,9 +33,25 @@ jobs:
3233
- name: set output version
3334
shell: bash
3435
run: |
35-
echo BUILD_VERSION="${{steps.get-version.outputs.build-version}}" >> $GITHUB_ENV
36+
echo BUILD_VERSION="${{steps.get-version.outputs.version}}" >> $GITHUB_ENV
37+
echo BUILD_SNAPSHOT="${{steps.get-version.outputs.snapshot}}" >> $GITHUB_ENV
3638
cat $GITHUB_ENV
3739
40+
check-publish:
41+
needs: [version]
42+
name: check publish
43+
44+
runs-on: ubuntu-latest
45+
if: >-
46+
github.actor != 'dependabot[bot]' &&
47+
github.actor == 'hauner' && contains(needs.version.outputs.BUILD_VERSION, 'SNAPSHOT')
48+
49+
steps:
50+
- run: |
51+
echo "should publish ..."
52+
echo version BUILD_VERSION ${{needs.version.outputs.BUILD_VERSION}}
53+
echo version BUILD_SNAPSHOT ${{needs.version.outputs.BUILD_SNAPSHOT}}
54+
3855
test:
3956
name: test
4057

@@ -70,23 +87,8 @@ jobs:
7087
name: test-results-${{ matrix.os }}
7188
path: '*/build/reports'
7289

73-
check-publish:
74-
needs: [version, test]
75-
name: check publish
76-
77-
runs-on: ubuntu-latest
78-
if: >-
79-
github.actor != 'dependabot[bot]' &&
80-
github.actor == 'hauner' && contains(needs.version.outputs.BUILD_VERSION, 'SNAPSHOT')
81-
82-
steps:
83-
- run: |
84-
echo "should publish ..."
85-
echo version BUILD_VERSION ${{needs.version.outputs.BUILD_VERSION}}
86-
echo version-test BUILD_VERSION ${{needs.version-test.outputs.BUILD_VERSION}}
87-
8890
publish:
89-
needs: [check-publish]
91+
needs: [check-publish, test]
9092
name: publish snapshot
9193

9294
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)