-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (75 loc) · 3.07 KB
/
step_package.yml
File metadata and controls
88 lines (75 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: package
run-name: Package plugin
on:
workflow_call:
jobs:
package:
name: package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go environment
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.23'
- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-artifacts
path: dist
# Remove this once plugin review has been submitted
- name: Package plugin
# Grafana Labs review needs the plugin file in zip format with sha1 checksum
run: |
# Upload/Download artifacts wont preserve permissions
# https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss
# Add +x bits on executables
chmod -R +x dist/gpx_*
mv dist cloudeteer-pdfreport-app
zip cloudeteer-pdfreport-app-nightly.zip cloudeteer-pdfreport-app -r
sha1sum cloudeteer-pdfreport-app-nightly.zip | cut -f1 -d' ' > cloudeteer-pdfreport-app-nightly.zip.sha1
- name: Validate plugin
run: |
zip plugin-app.zip pkg/ src/ package.json go.* Magefile.go -r
git clone --depth 1 --branch v0.16.1 https://github.com/grafana/plugin-validator
pushd ./plugin-validator/pkg/cmd/plugincheck2
go install
popd
plugincheck2 -sourceCodeUri plugin-app.zip -config ./plugin-validator/config/pipeline.yaml cloudeteer-pdfreport-app-nightly.zip
shell: bash
# Check if bootstrap script is working for latest release and nightly release
#- name: Check bootstrap script
# run: |
# mkdir -p latest
# cd latest
# ../scripts/bootstrap-dashboard-reporter-app.sh
# cd ..
# mkdir -p nightly
# cd nightly
# NIGHTLY=1 ../scripts/bootstrap-dashboard-reporter-app.sh
# cd ..
# shell: bash
- name: Upload plugin artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: plugin-artifacts
path: |
cloudeteer-pdfreport-app-nightly.zip
cloudeteer-pdfreport-app-nightly.zip.sha1
retention-days: 3
- name: Release nightly
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
# Only run on main branch
if: github.ref == 'refs/heads/main'
with:
prerelease: true
name: nightly
tag_name: nightly
files: |
cloudeteer-pdfreport-app-nightly.zip
cloudeteer-pdfreport-app-nightly.zip.sha1
fail_on_unmatched_files: true
body: |
# Latest Build Complete! :rocket:
For the public download links of these build artifacts, please see:
<https://github.com/cloudeteer/grafana-pdf-report-app/releases/tag/nightly>