Skip to content

Merge pull request #207 from sfeifer/release-branch #19

Merge pull request #207 from sfeifer/release-branch

Merge pull request #207 from sfeifer/release-branch #19

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Publish Release
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup Node.js 17
uses: actions/setup-node@v3
with:
node-version: 17
- name: Install jsonnet, jsonnet-bundler and grafana/plugin-validator
run: |
go install github.com/google/go-jsonnet/cmd/jsonnet@latest
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
go install github.com/grafana/plugin-validator/pkg/cmd/plugincheck2@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Install dependencies
run: make deps
- name: Test & Build plugin
run: |
make test-backend
make build # also runs frontend tests
- name: Check if package version and git tag matches
run: |
if [ "v$(jq -r '.info.version' dist/plugin.json)" != "${GITHUB_REF#refs/*/}" ]; then
echo "Plugin version doesn't match git tag"
exit 1
fi
- name: Sign plugin
run: make sign
env:
GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }}
- name: Create plugin zip file
run: make zip
- name: Run plugincheck
run: make plugincheck
- name: Create GitHub release
run: ci/scripts/github-release.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}