|
8 | 8 | jobs:
|
9 | 9 | release:
|
10 | 10 | runs-on: ubuntu-latest
|
11 |
| - |
| 11 | + permissions: |
| 12 | + contents: write |
12 | 13 | steps:
|
13 | 14 | - uses: actions/checkout@v2
|
14 | 15 |
|
@@ -108,46 +109,24 @@ jobs:
|
108 | 109 | echo "::set-output name=checksum::$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)"
|
109 | 110 | - name: Lint plugin
|
110 | 111 | run: |
|
111 |
| - git clone https://github.com/grafana/plugin-validator |
112 |
| - pushd ./plugin-validator/pkg/cmd/plugincheck |
| 112 | + # TODO(ddelnano): This should be removed once Go is upgraded to 1.21 or later |
| 113 | + # This will also likely change when https://github.com/pixie-io/grafana-plugin/issues/106 |
| 114 | + # is resolved |
| 115 | + git clone --branch v0.7.1 --depth 1 https://github.com/grafana/plugin-validator |
| 116 | + pushd ./plugin-validator/pkg/cmd/plugincheck2 |
113 | 117 | go install
|
114 | 118 | popd
|
115 |
| - plugincheck ${{ steps.metadata.outputs.archive }} |
| 119 | + plugincheck2 ${{ steps.metadata.outputs.archive }} |
116 | 120 | - name: Create release
|
117 | 121 | id: create_release
|
118 |
| - uses: actions/create-release@v1 |
| 122 | + uses: softprops/action-gh-release@v2 |
119 | 123 | env:
|
120 | 124 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
121 | 125 | with:
|
122 | 126 | tag_name: ${{ github.ref }}
|
123 | 127 | release_name: Release ${{ github.ref }}
|
124 | 128 | body_path: ${{ steps.changelog.outputs.path }}
|
| 129 | + files: | |
| 130 | + ${{ steps.metadata.outputs.archive }} |
| 131 | + ${{ steps.metadata.outputs.archive-checksum }} |
125 | 132 | draft: true
|
126 |
| - |
127 |
| - - name: Add plugin to release |
128 |
| - id: upload-plugin-asset |
129 |
| - uses: actions/upload-release-asset@v1 |
130 |
| - env: |
131 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
132 |
| - with: |
133 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
134 |
| - asset_path: ./${{ steps.metadata.outputs.archive }} |
135 |
| - asset_name: ${{ steps.metadata.outputs.archive }} |
136 |
| - asset_content_type: application/zip |
137 |
| - |
138 |
| - - name: Add checksum to release |
139 |
| - id: upload-checksum-asset |
140 |
| - uses: actions/upload-release-asset@v1 |
141 |
| - env: |
142 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
143 |
| - with: |
144 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
145 |
| - asset_path: ./${{ steps.metadata.outputs.archive-checksum }} |
146 |
| - asset_name: ${{ steps.metadata.outputs.archive-checksum }} |
147 |
| - asset_content_type: text/plain |
148 |
| - |
149 |
| - - name: Publish to Grafana.com |
150 |
| - run: | |
151 |
| - echo A draft release has been created for your plugin. Please review and publish it. Then submit your plugin to grafana.com/plugins by opening a PR to https://github.com/grafana/grafana-plugin-repository with the following entry: |
152 |
| - echo |
153 |
| - echo '{ "id": "${{ steps.metadata.outputs.plugin-id }}", "type": "${{ steps.metadata.outputs.plugin-type }}", "url": "https://github.com/${{ github.repository }}", "versions": [ { "version": "${{ steps.metadata.outputs.plugin-version }}", "commit": "${{ github.sha }}", "url": "https://github.com/${{ github.repository }}", "download": { "any": { "url": "https://github.com/${{ github.repository }}/releases/download/v${{ steps.metadata.outputs.plugin-version }}/${{ steps.metadata.outputs.archive }}", "md5": "${{ steps.package-plugin.outputs.checksum }}" } } } ] }' | jq . |
0 commit comments