Release #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |