feat : automation for compiling and releasing artifacts #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "version-*" # Trigger the workflow on push events to version-* tags | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build Artifact | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Build binary | |
| run: | | |
| echo "Building Grafana Dashboards, Prometheus Rules and Alerts" | |
| make | |
| echo "Compressing Artifacts" | |
| zip -r kubernetes-mixin-${{ github.ref_name }}.zip dashboards_out prometheus_alerts.yaml prometheus_rules.yaml | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Create release on kubernetes-mixin | |
| uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| repository: Monitoring-Projects/kubernetes-mixin | |
| generate_release_notes: true | |
| files: kubernetes-mixin-${{ github.ref_name }}.zip |