Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .config/jest/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const nodeModulesToTransform = (moduleNames) => `node_modules\/(?!.*(${moduleNam
const grafanaESModules = [
'.pnpm', // Support using pnpm symlinked packages
'@grafana/schema',
'pkce-challenge',
'd3',
'd3-color',
'd3-force',
Expand Down
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

79 changes: 8 additions & 71 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,82 +3,19 @@ name: Release
on:
push:
tags:
- 'v*.*.*' # Run workflow on version tags, e.g. v1.0.0.
- "v*" # Run workflow on version tags, e.g. v1.0.0.

jobs:
release:
permissions:
id-token: write
contents: write
attestations: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Sign plugin
run: npm run sign
env:
GRAFANA_ACCESS_POLICY_TOKEN: ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }}

- name: Get plugin metadata
id: metadata
run: |
sudo apt-get install jq

export GRAFANA_PLUGIN_ID=$(cat dist/plugin.json | jq -r .id)
export GRAFANA_PLUGIN_VERSION=$(cat dist/plugin.json | jq -r .info.version)
export GRAFANA_PLUGIN_TYPE=$(cat dist/plugin.json | jq -r .type)
export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.zip
export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5

echo "plugin-id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT
echo "plugin-version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT
echo "plugin-type=${GRAFANA_PLUGIN_TYPE}" >> $GITHUB_OUTPUT
echo "archive=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_OUTPUT
echo "archive-checksum=${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" >> $GITHUB_OUTPUT

echo "github-tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Read changelog
id: changelog
run: |
awk '/^## / {s++} s == 1 {print}' CHANGELOG.md > release_notes.md
export RELEASE_TITLE=$(head -1 release_notes.md|sed 's/## //')
awk 'NR > 2 { print }' release_notes.md > release_body.md

echo "title=${RELEASE_TITLE}" >> $GITHUB_OUTPUT
echo "path=release_body.md" >> $GITHUB_OUTPUT
echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Check package version
run: if [ "v${{ steps.metadata.outputs.plugin-version }}" != "${{ steps.metadata.outputs.github-tag }}" ]; then printf "\033[0;31mPlugin version doesn't match tag name\033[0m\n"; exit 1; fi

- name: Package plugin
id: package-plugin
run: |
mv dist ${{ steps.metadata.outputs.plugin-id }}
zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r
md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }}
echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT

- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
- uses: grafana/plugin-actions/build-plugin@main
with:
tag_name: ${{ github.ref }}
name: ${{ steps.changelog.outputs.title }}
body_path: ${{ steps.changelog.outputs.path }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
files: |
./${{ steps.metadata.outputs.archive }}
./${{ steps.metadata.outputs.archive-checksum }}
policy_token: ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }}
attestation: true
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 5.0.0 (2025-07-12)

### Breaking changes

- Requires Grafana 11 and Grafana 12

### Features / Enhancements

- Update to Grafana 12 and dependencies

## 4.5.0 (2024-12-23)

### Features / Enhancements
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Screenshot](https://github.com/volkovlabs/business-input/raw/main/src/img/dark.png)

![Grafana](https://img.shields.io/badge/Grafana-11.4-orange)
![Grafana](https://img.shields.io/badge/Grafana-12.0-orange)
![CI](https://github.com/volkovlabs/business-input/workflows/CI/badge.svg)
![E2E](https://github.com/volkovlabs/business-input/workflows/E2E/badge.svg)
[![codecov](https://codecov.io/gh/VolkovLabs/business-input/branch/main/graph/badge.svg)](https://codecov.io/gh/VolkovLabs/business-input)
Expand All @@ -16,6 +16,7 @@ The Business Input data source is a plugin for Grafana that allows storing and e

## Requirements

- Business Input data source version 5.X requires **Grafana 11** or **Grafana 12**.
- Business Input data source version 4.X requires **Grafana 10.3** or **Grafana 11**.
- Static data source version 3.X requires **Grafana 9.2** or **Grafana 10**.
- Static data source version 2.X requires **Grafana 8.5** or **Grafana 9**.
Expand Down
6 changes: 6 additions & 0 deletions jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
import './.config/jest-setup';

import { TextDecoder, TextEncoder } from 'util';
import { TransformStream, ReadableStream, WritableStream } from 'stream/web';

/**
* Assign Web Streams API which are required in @grafana/ui
*/
Object.assign(global, { TransformStream, ReadableStream, WritableStream });

/**
* Assign Text Decoder and Encoder which are required in @grafana/ui
Expand Down
Loading
Loading