Skip to content

Commit

Permalink
OM-191 - Github action to generate release artifacts (#115)
Browse files Browse the repository at this point in the history
added github action to upload tar.gz artifacts to release tag
  • Loading branch information
mphanias committed May 9, 2024
1 parent 66cc575 commit 8e190ff
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_artefacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Create tar.gz artifacts of dashboards

on:
push:
tags:
- v*

permissions:
id-token: write
actions: write
contents: write

jobs:
tar_zipping_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag

- name: Create tar files
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: "${{ steps.get-latest-tag.outputs.tag }}"
run: |
cd config/grafana
echo "Tar-zipping files"
VERSION=${GITHUB_REF_NAME#v}
tar czf aerospike-grafana-dashboards-$VERSION.tar.gz dashboards/*
echo
echo "Uploading release asset"
gh release upload "$TAG_NAME" "aerospike-grafana-dashboards-$VERSION.tar.gz"

0 comments on commit 8e190ff

Please sign in to comment.