diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index 84d412d..a2c1d96 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -9,6 +9,7 @@ on: jobs: build: runs-on: ubuntu-latest + environment: PluginBuild strategy: matrix: @@ -23,9 +24,18 @@ jobs: node-version: ${{ matrix.node-version }} - name: Build + env: + PLUGIN_ID: ${{ vars.PLUGIN_ID }} + NODE_OPTIONS: ${{ vars.NODE_OPTIONS }} + GRAFANA_ACCESS_POLICY_TOKEN: ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }} run: | + export NODE_OPTIONS=--openssl-legacy-provider npm install -g corepack corepack enable - corepack prepare yarn@stable --activate - yarn install + yarn yarn build + npx @grafana/sign-plugin@latest + cp -r dist "${PLUGIN_ID}" + zip -qr "${PLUGIN_ID}.zip" "${PLUGIN_ID}" + npx @grafana/plugin-validator@latest -sourceCodeUri file://. "${PLUGIN_ID}.zip" + sha1sum ${PLUGIN_ID}.zip