Skip to content

Commit 20e18d1

Browse files
authored
Update Release of kubectl-grafana (#69)
1 parent 8ec7176 commit 20e18d1

File tree

2 files changed

+48
-56
lines changed

2 files changed

+48
-56
lines changed

.github/workflows/kubectl-grafana.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,54 @@ jobs:
2929
uses: grafana/plugin-actions/build-plugin@main
3030
with:
3131
go-version: '1.24'
32-
node-versio: '22'
32+
node-version: '22'
3333
attestation: true
3434
use_changelog_generator: true
3535
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

Comments
 (0)