-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) · 1.44 KB
/
release.yml
File metadata and controls
60 lines (49 loc) · 1.44 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run test:ci
- run: npm run lint
- run: npm run typecheck
- run: npm run build
- name: Sign plugin
if: ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN != '' }}
env:
GRAFANA_ACCESS_POLICY_TOKEN: ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }}
run: npm run sign
- run: npm run package
- name: Get plugin metadata
id: metadata
run: |
echo "version=$(node -p "require('./src/plugin.json').info.version")" >> $GITHUB_OUTPUT
echo "id=$(node -p "require('./src/plugin.json').id")" >> $GITHUB_OUTPUT
echo "name=$(node -p "require('./src/plugin.json').name")" >> $GITHUB_OUTPUT
- uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
generate_release_notes: true
files: |
cybertec-pev-panel.zip
dist/MANIFEST.txt
- uses: actions/upload-artifact@v4
with:
name: plugin-artifacts-${{ github.ref_name }}
path: |
cybertec-pev-panel.zip
dist/**/*
retention-days: 90