|
9 | 9 | release: |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | env: |
12 | | - GRAFANA_API_KEY: $\{{ secrets.GRAFANA_API_KEY }} # Requires a Grafana API key from Grafana.com. |
| 12 | + GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }} # Requires a Grafana API key from Grafana.com. |
13 | 13 | steps: |
14 | 14 | - uses: actions/checkout@v3 |
15 | 15 |
|
@@ -78,45 +78,45 @@ jobs: |
78 | 78 | echo "path=release_notes.md" >> $GITHUB_OUTPUT |
79 | 79 |
|
80 | 80 | - name: Check package version |
81 | | - 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 |
| 81 | + 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"; echo v${{ steps.metadata.outputs.plugin-version }} ${{ steps.metadata.outputs.github-tag }}; exit 1; fi |
82 | 82 |
|
83 | 83 | - name: Package plugin |
84 | 84 | id: package-plugin |
85 | 85 | run: | |
86 | | - mv dist $\{{ steps.metadata.outputs.plugin-id }} |
87 | | - zip $\{{ steps.metadata.outputs.archive }} $\{{ steps.metadata.outputs.plugin-id }} -r |
88 | | - md5sum $\{{ steps.metadata.outputs.archive }} > $\{{ steps.metadata.outputs.archive-checksum }} |
89 | | - echo "checksum=$(cat ./$\{{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT |
| 86 | + mv dist ${{ steps.metadata.outputs.plugin-id }} |
| 87 | + zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r |
| 88 | + md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} |
| 89 | + echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT |
90 | 90 |
|
91 | 91 | - name: Validate plugin |
92 | 92 | run: | |
93 | 93 | git clone https://github.com/grafana/plugin-validator |
94 | 94 | pushd ./plugin-validator/pkg/cmd/plugincheck2 |
95 | 95 | go install |
96 | 96 | popd |
97 | | - plugincheck2 -config ./plugin-validator/config/default.yaml $\{{ steps.metadata.outputs.archive }} |
| 97 | + plugincheck2 -config ./plugin-validator/config/default.yaml ${{ steps.metadata.outputs.archive }} |
98 | 98 |
|
99 | 99 | - name: Create Github release |
100 | 100 | uses: softprops/action-gh-release@v1 |
101 | 101 | with: |
102 | 102 | draft: true |
103 | 103 | generate_release_notes: true |
104 | 104 | files: | |
105 | | - ./$\{{ steps.metadata.outputs.archive }} |
106 | | - ./$\{{ steps.metadata.outputs.archive-checksum }} |
| 105 | + ./${{ steps.metadata.outputs.archive }} |
| 106 | + ./${{ steps.metadata.outputs.archive-checksum }} |
107 | 107 | body: | |
108 | 108 | **This Github draft release has been created for your plugin.** |
109 | 109 |
|
110 | | - _Note: if this is the first release for your plugin please consult the [distributing-your-plugin section](https://github.com/$\{{github.repository}}/blob/main/README.md#distributing-your-plugin) of the README_ |
| 110 | + _Note: if this is the first release for your plugin please consult the [distributing-your-plugin section](https://github.com/${{github.repository}}/blob/main/README.md#distributing-your-plugin) of the README_ |
111 | 111 |
|
112 | 112 | If you would like to submit this release to Grafana please consider the following steps: |
113 | 113 |
|
114 | | - - Check the Validate plugin step in the [release workflow](https://github.com/$\{{github.repository}}/commit/$\{{github.sha}}/checks/$\{{github.run_id}}) for any warnings that need attention |
| 114 | + - Check the Validate plugin step in the [release workflow](https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}}) for any warnings that need attention |
115 | 115 | - Navigate to https://grafana.com/auth/sign-in/ to sign into your account |
116 | 116 | - Once logged in click **My Plugins** in the admin navigation |
117 | 117 | - Click the **Submit Plugin** button |
118 | 118 | - Fill in the Plugin Submission form: |
119 | | - - Paste this [.zip asset link](https://github.com/$\{{ github.repository }}/releases/download/v$\{{ steps.metadata.outputs.plugin-version }}/$\{{ steps.metadata.outputs.archive }}) in the Plugin URL field |
120 | | - - Paste this [.zip.md5 link](https://github.com/$\{{ github.repository }}/releases/download/v$\{{ steps.metadata.outputs.plugin-version }}/$\{{ steps.metadata.outputs.archive-checksum }}) in the MD5 field |
| 119 | + - Paste this [.zip asset link](https://github.com/${{ github.repository }}/releases/download/v${{ steps.metadata.outputs.plugin-version }}/${{ steps.metadata.outputs.archive }}) in the Plugin URL field |
| 120 | + - Paste this [.zip.md5 link](https://github.com/${{ github.repository }}/releases/download/v${{ steps.metadata.outputs.plugin-version }}/${{ steps.metadata.outputs.archive-checksum }}) in the MD5 field |
121 | 121 |
|
122 | 122 | Once done please remove these instructions and publish this release. |
0 commit comments