Skip to content

Commit

Permalink
Add pipeline step to upload packaged plugin to Factry Portal
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Van der Poorten committed Jul 15, 2024
1 parent 219cf5b commit eb8f3f0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,24 @@ jobs:
- uses: grafana/plugin-actions/build-plugin@release
with:
policy_token: ${{ secrets.GRAFANA_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_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.zip
echo "plugin-id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT
echo "plugin-version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT
echo "archive=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_OUTPUT
- name: Upload to Factry Portal
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.FACTRY_PORTAL_PRODUCT_UPDATES_JWT_TOKEN }}" \
-F "productType=${{steps.metadata.outputs.plugin-id }}" \
-F "product=grafana-datasource" \
-F "version=${{steps.metadata.outputs.plugin-version }}" \
-F "binary=@${{ steps.metadata.outputs.archive }}" \
--url "${{vars.FACTRY_PORTAL_PRODUCT_UPDATES_URL }}"
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v2.0.3-beta

- Added automatic publishing to Factry Portal

## v2.0.2

### Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "factry-historian-datasource",
"version": "2.0.2",
"version": "2.0.3-beta",
"description": "A datasource plugin for Factry Historian",
"scripts": {
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",
Expand Down

0 comments on commit eb8f3f0

Please sign in to comment.