-
Notifications
You must be signed in to change notification settings - Fork 15
80 lines (70 loc) · 2.6 KB
/
release.yml
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
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- name: build signed
id: build-signed
uses: ./.github/build/
env:
GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }}
with:
release: true
signed: true
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: ${{ steps.build-signed.changelog_path }}
draft: true
artifacts: ${{ steps.build-signed.outputs.plugin_path }},${{ steps.build-signed.outputs.plugin_checksum_path }}
- uses: actions/checkout@v3
- name: build unsigned
id: build-unsigned
uses: ./.github/build/
with:
release: true
signed: false
# TODO: use another action, this is deprecated and generates warnings
- name: Add unsigned files to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ steps.build-unsigned.outputs.plugin_path }}
asset_name: ${{ steps.build-unsigned.outputs.plugin_path }}
asset_content_type: text/plain
# TODO: use another action, this is deprecated and generates warnings
- name: Add unsigned files to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ steps.build-unsigned.outputs.plugin_checksum_path }}
asset_name: ${{ steps.build-unsigned.outputs.plugin_checksum_path }}
asset_content_type: text/plain
- uses: adelynx/github-actions-nodemailer@v1.0.3
with:
host: ${{ secrets.NOTIFICATION_SMTP_SERVER }}
port: 465
username: '${{ secrets.NOTIFICATION_SMTP_USER }}'
password: '${{ secrets.NOTIFICATION_SMTP_PASSWORD }}'
from: 'Grafana notifications <${{ secrets.NOTIFICATION_SMTP_USER }}>'
to: '${{ secrets.NOTIFICATION_DESTINATION }}'
subject: '✅ New release of Grafana data source plugin'
body: |
<p>A new release of the Grafana data source plugin has been published!</p>