|
19 | 19 |
|
20 | 20 | jobs: |
21 | 21 | detect-noop: |
| 22 | + name: Detect No-op Changes |
22 | 23 | runs-on: ubuntu-latest |
23 | 24 | outputs: |
24 | 25 | noop: ${{ steps.noop.outputs.should_skip }} |
|
33 | 34 | concurrent_skipping: false |
34 | 35 |
|
35 | 36 | upload-test-binary: |
| 37 | + name: Build and Upload Test Binaries |
36 | 38 | needs: detect-noop |
37 | 39 | if: needs.detect-noop.outputs.noop != 'true' |
38 | 40 | runs-on: ubuntu-latest |
| 41 | + strategy: |
| 42 | + matrix: |
| 43 | + platform: |
| 44 | + - linux-amd64 |
| 45 | + - darwin-amd64 |
| 46 | + - darwin-arm64 |
| 47 | + binary: |
| 48 | + - kube-trigger |
| 49 | + - manager |
39 | 50 | steps: |
40 | 51 | - name: Checkout Code |
41 | 52 | uses: actions/checkout@v3 |
@@ -64,31 +75,19 @@ jobs: |
64 | 75 | - name: Get Version |
65 | 76 | id: get_version |
66 | 77 | run: | |
67 | | - export VERSION=$(./make-kt version) |
| 78 | + VERSION=$(./make-kt version) |
68 | 79 | echo ::set-output name=VERSION::${VERSION} |
69 | 80 |
|
70 | | - - name: Build Binaries for linux and darwin |
| 81 | + - name: Build Binary |
71 | 82 | env: |
72 | 83 | DIRTY_BUILD: true |
73 | 84 | run: | |
74 | | - ./make-kt build-linux_amd64 |
75 | | - ./make-kt build-darwin_amd64 |
76 | | - ./make-kt build-darwin_arm64 |
| 85 | + PLATFORM=${{ matrix.platform }} |
| 86 | + BINARY=${{ matrix.binary }} |
| 87 | + make -f ${BINARY/-/}.mk build-${PLATFORM/-/_} |
77 | 88 |
|
78 | | - - name: Upload Artifacts (linux-amd64) |
| 89 | + - name: Upload Artifacts |
79 | 90 | uses: actions/upload-artifact@v3 |
80 | 91 | with: |
81 | | - name: kube-trigger-${{ steps.get_version.outputs.VERSION }}-linux-amd64 |
82 | | - path: bin/kube-trigger-${{ steps.get_version.outputs.VERSION }}/kube-trigger-*-linux-amd64 |
83 | | - |
84 | | - - name: Upload Artifacts (darwin-amd64) |
85 | | - uses: actions/upload-artifact@v3 |
86 | | - with: |
87 | | - name: kube-trigger-${{ steps.get_version.outputs.VERSION }}-darwin-amd64 |
88 | | - path: bin/kube-trigger-${{ steps.get_version.outputs.VERSION }}/kube-trigger-*-darwin-amd64 |
89 | | - |
90 | | - - name: Upload Artifacts (darwin-arm64) |
91 | | - uses: actions/upload-artifact@v3 |
92 | | - with: |
93 | | - name: kube-trigger-${{ steps.get_version.outputs.VERSION }}-darwin-arm64 |
94 | | - path: bin/kube-trigger-${{ steps.get_version.outputs.VERSION }}/kube-trigger-*-darwin-arm64 |
| 92 | + name: ${{ matrix.binary }}-${{ steps.get_version.outputs.VERSION }}-${{ matrix.platform }} |
| 93 | + path: bin/${{ matrix.binary }}-${{ steps.get_version.outputs.VERSION }}/${{ matrix.binary }}-*-${{ matrix.platform }} |
0 commit comments