|
29 | 29 | uses: grafana/plugin-actions/build-plugin@main |
30 | 30 | with: |
31 | 31 | go-version: '1.24' |
32 | | - node-versio: '22' |
| 32 | + node-version: '22' |
33 | 33 | attestation: true |
34 | 34 | use_changelog_generator: true |
35 | 35 | token: ${{ secrets.GITHUB_TOKEN }} |
| 36 | + |
| 37 | + kubectl-grafana: |
| 38 | + name: kubectl-grafana |
| 39 | + runs-on: ubuntu-latest |
| 40 | + permissions: |
| 41 | + contents: write |
| 42 | + needs: release |
| 43 | + strategy: |
| 44 | + matrix: |
| 45 | + platform: |
| 46 | + [ |
| 47 | + { os: 'darwin', arch: 'amd64', build: 'buildKubectl:darwin' }, |
| 48 | + { os: 'darwin', arch: 'arm64', build: 'buildKubectl:darwinARM64' }, |
| 49 | + { os: 'linux', arch: 'amd64', build: 'buildKubectl:linux' }, |
| 50 | + { os: 'linux', arch: 'arm64', build: 'buildKubectl:linuxARM64' }, |
| 51 | + { os: 'windows', arch: 'amd64', build: 'buildKubectl:windows' }, |
| 52 | + ] |
| 53 | + steps: |
| 54 | + - name: Checkout |
| 55 | + uses: actions/checkout@v4 |
| 56 | + with: |
| 57 | + fetch-depth: 0 |
| 58 | + |
| 59 | + - name: Setup Go |
| 60 | + uses: actions/setup-go@v5 |
| 61 | + with: |
| 62 | + go-version-file: go.mod |
| 63 | + cache: true |
| 64 | + cache-dependency-path: go.sum |
| 65 | + |
| 66 | + - name: Install Dependencies |
| 67 | + run: | |
| 68 | + go mod download |
| 69 | +
|
| 70 | + - name: Build |
| 71 | + run: | |
| 72 | + go tool mage -v ${{ matrix.platform.build }} |
| 73 | +
|
| 74 | + cd ./dist/kubectl-grafana |
| 75 | + mv kubectl-grafana-* kubectl-grafana |
| 76 | + tar -czf kubectl-grafana-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz kubectl-grafana |
| 77 | +
|
| 78 | + - name: Upload Artifact |
| 79 | + env: |
| 80 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 81 | + run: | |
| 82 | + gh release upload ${{ github.ref_name }} ./dist/kubectl-grafana/kubectl-grafana-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz |
0 commit comments