Skip to content

Commit d7c1b92

Browse files
committed
feat : automation for compiling and releasing artifacts
Signed-off-by: Pratik Raj <[email protected]>
1 parent 7e65d91 commit d7c1b92

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

.github/workflows/release.yaml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,47 @@ permissions:
99
contents: write
1010

1111
jobs:
12+
build:
13+
name: Build Artifact
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: '1.24'
23+
24+
- name: Build binary
25+
run: |
26+
echo "Building Grafana Dashboards, Prometheus Rules and Alerts"
27+
make
28+
echo "Compressing Artifacts"
29+
zip -r kubernetes-mixin-${{ github.ref_name }}.zip dashboards_out prometheus_alerts.yaml prometheus_rules.yaml
30+
31+
- name: Upload artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: kubernetes-mixin-${{ github.ref_name }}.zip
35+
path: ./
36+
1237
release:
1338
name: Release
1439
runs-on: ubuntu-latest
40+
needs: build
1541
steps:
42+
- name: Download artifact
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: kubernetes-mixin-${{ github.ref_name }}.zip
46+
1647
- name: Create release on kubernetes-mixin
1748
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
1849
env:
1950
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2051
with:
2152
tag_name: ${{ github.ref_name }}
22-
repository: kubernetes-monitoring/kubernetes-mixin
53+
repository: Monitoring-Projects/kubernetes-mixin
2354
generate_release_notes: true
55+
files: kubernetes-mixin-${{ github.ref_name }}.zip

0 commit comments

Comments
 (0)