-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (78 loc) · 2.83 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Release
on:
workflow_dispatch:
inputs:
release-version:
description: 'Release version (<MAJOR>.<MINOR>)'
required: true
permissions:
contents: write
jobs:
build-and-test:
name: Build and Test
uses: ./.github/workflows/build-and-test.yml
release:
name: Release
runs-on: ubuntu-latest
needs: build-and-test
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: v${{ inputs.release-version }}
WINDOWS_RELEASE_PLUGIN_ZIP: xpanel_windows_v${{ inputs.release-version }}.zip
LINUX_RELEASE_PLUGIN_ZIP: xpanel_linux_v${{ inputs.release-version }}_glibc2.35.zip
SAMPLE_CONFIG_ZIP: sample_configs_v${{ inputs.release-version }}.zip
steps:
- uses: actions/checkout@v3
- name: Download built plugin (Windows)
uses: actions/download-artifact@v3
with:
name: built-plugin-windows
path: built-plugin-windows/plugins/XPanel/64/
- name: Download built plugin (Linux)
uses: actions/download-artifact@v3
with:
name: built-plugin-linux
path: built-plugin-linux/plugins/XPanel/64/
- name: Download docs
uses: actions/download-artifact@v3
with:
name: docs
path: doc/
- name: Copy 3rd party dlls (Windows)
run: |
cp 3rdparty/LUA/lua54.dll built-plugin-windows/plugins/XPanel/64/
cp 3rdparty/FIP-SDK/lib/DirectOutput.dll built-plugin-windows/plugins/XPanel/64/
- name: Copy board-config.ini
run: |
cp sample-config/board-config.ini built-plugin-windows/plugins/XPanel/64/
cp sample-config/board-config.ini built-plugin-linux/plugins/XPanel/64/
- name: Copy FIP Fonts BMP
run: |
cp 3rdparty/FIP-SDK/fonts/fip-fonts.bmp built-plugin-windows/plugins/XPanel/64/
cp 3rdparty/FIP-SDK/fonts/fip-fonts.bmp built-plugin-linux/plugins/XPanel/64/
- name: Copy Doc PDF
run: |
cp doc/documentation.pdf built-plugin-windows/plugins/XPanel/64/
cp doc/documentation.pdf built-plugin-linux/plugins/XPanel/64/
- name: Create release plugin zip (Windows)
run: |
cd built-plugin-windows
zip -r ../${WINDOWS_RELEASE_PLUGIN_ZIP} .
- name: Create release plugin zip (Linux)
run: |
cd built-plugin-linux
zip -r ../${LINUX_RELEASE_PLUGIN_ZIP} .
- name: Create sample configs zip
run: |
cd sample-config
zip -r ../${SAMPLE_CONFIG_ZIP} .
- name: Create draft release
run: |
gh release create \
--draft \
--title "v${{ inputs.release-version }} release" \
--generate-notes \
${TAG} \
${WINDOWS_RELEASE_PLUGIN_ZIP} \
${LINUX_RELEASE_PLUGIN_ZIP} \
${SAMPLE_CONFIG_ZIP}