24
24
25
25
- name : Get yarn cache directory path
26
26
id : yarn-cache-dir-path
27
- run : echo "::set-output name= dir:: $(yarn cache dir)"
27
+ run : echo "dir= $(yarn cache dir)" >> $GITHUB_OUTPUT
28
28
29
29
- name : Cache yarn cache
30
30
uses : actions/cache@v4
@@ -53,23 +53,13 @@ jobs:
53
53
- name : Build and test frontend
54
54
run : yarn build
55
55
56
- - name : Check for backend
57
- id : check-for-backend
58
- run : |
59
- if [ -f "Magefile.go" ]
60
- then
61
- echo "::set-output name=has-backend::true"
62
- fi
63
-
64
56
- name : Test backend
65
- if : steps.check-for-backend.outputs.has-backend == 'true'
66
57
uses : magefile/mage-action@v3
67
58
with :
68
59
version : latest
69
60
args : coverage
70
61
71
62
- name : Build backend
72
- if : steps.check-for-backend.outputs.has-backend == 'true'
73
63
uses : magefile/mage-action@v3
74
64
with :
75
65
version : latest
@@ -86,30 +76,29 @@ jobs:
86
76
export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}.zip
87
77
export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5
88
78
89
- echo "::set-output name=plugin-id::${GRAFANA_PLUGIN_ID}"
90
- echo "::set-output name=plugin-version::${GRAFANA_PLUGIN_VERSION}"
91
- echo "::set-output name=plugin-type::${GRAFANA_PLUGIN_TYPE}"
92
- echo "::set-output name=archive::${GRAFANA_PLUGIN_ARTIFACT}"
93
- echo "::set-output name=archive-checksum::${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}"
94
-
95
- echo ::set-output name=github-tag::${GITHUB_REF#refs/*/}
79
+ echo "plugin_id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT
80
+ echo "plugin_version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT
81
+ echo "plugin_type=${GRAFANA_PLUGIN_TYPE}" >> $GITHUB_OUTPUT
82
+ echo "archive=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_OUTPUT
83
+ echo "archive_checksum=${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" >> $GITHUB_OUTPUT
84
+ echo "github_tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
96
85
97
86
- name : Read changelog
98
87
id : changelog
99
88
run : |
100
89
awk '/^## / {s++} s == 1 {print}' CHANGELOG.md > release_notes.md
101
- echo "::set-output name=path:: release_notes.md"
90
+ echo "changelog_path= release_notes.md" >> $GITHUB_OUTPUT
102
91
103
92
- name : Check package version
104
- 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
93
+ 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
105
94
106
95
- name : Package plugin
107
96
id : package-plugin
108
97
run : |
109
- mv dist ${{ steps.metadata.outputs.plugin-id }}
110
- zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r
111
- md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }}
112
- echo "::set-output name= checksum:: $(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)"
98
+ mv dist ${{ steps.metadata.outputs.plugin_id }}
99
+ zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin_id }} -r
100
+ md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive_checksum }}
101
+ echo "checksum= $(cat ./${{ steps.metadata.outputs.archive_checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT
113
102
114
103
- name : Create release
115
104
id : create_release
@@ -119,8 +108,8 @@ jobs:
119
108
with :
120
109
tag_name : ${{ github.ref }}
121
110
release_name : Release ${{ github.ref }}
122
- body_path : ${{ steps.changelog.outputs.path }}
123
- draft : true
111
+ body_path : ${{ steps.changelog.outputs.changelog_path }}
112
+ draft : false
124
113
125
114
- name : Add plugin to release
126
115
id : upload-plugin-asset
@@ -140,6 +129,6 @@ jobs:
140
129
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
141
130
with :
142
131
upload_url : ${{ steps.create_release.outputs.upload_url }}
143
- asset_path : ./${{ steps.metadata.outputs.archive-checksum }}
144
- asset_name : ${{ steps.metadata.outputs.archive-checksum }}
132
+ asset_path : ./${{ steps.metadata.outputs.archive_checksum }}
133
+ asset_name : ${{ steps.metadata.outputs.archive_checksum }}
145
134
asset_content_type : text/plain
0 commit comments