-
Notifications
You must be signed in to change notification settings - Fork 14
107 lines (91 loc) · 2.85 KB
/
build.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
96
97
98
99
100
101
102
103
104
105
106
107
name: build
on:
push:
tags:
- "v*"
workflow_dispatch:
env:
ZIP_NAME: UE4-DDS-Tools
GUI_VERSION: v0.6.3
jobs:
build:
runs-on: windows-2022
steps:
- name: Check tag
run: |
if [[ ${{ github.ref }} == refs/tags/v* ]]; then
TAG=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
else
TAG=$(echo ${{ github.sha }} | cut -c1-7)
fi
echo "TAG=$TAG" >> "$GITHUB_ENV"
shell: bash
- uses: actions/checkout@v4
- run: git submodule update --init --recursive
- name: Download embeddable python
run: |
mkdir -p release
cd release
../.github/workflows/download_portable_python.bat
shell: cmd
- name: build dll
run: |
external/Texconv-Custom-DLL/batch_files/build_without_vcruntime.bat
mkdir -p release/src/directx
cp external/Texconv-Custom-DLL/texconv.dll release/src/directx
- name: Copy files
run: |
cp -r src release
cp docs/changelog.txt release
cp docs/README.url release
cp LICENSE release/src
cp -r release release_gui
cp bat/* release
shell: bash
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Meson
run: pip install meson
- name: Prepare MSVC for Windows
if: runner.os == 'Windows'
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
- name: Build Tuw
run: |
external/tuw/batch_files/build_with_ucrt.bat
cp external/tuw/build/ReleaseUCRT/Tuw.exe release_gui/GUI.exe
cp gui_definition.json release_gui
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
directory: 'release'
type: 'zip'
filename: '${{ env.ZIP_NAME }}-${{ env.TAG }}-Batch.zip'
exclusions: '*.git* .gitignore'
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
directory: 'release_gui'
type: 'zip'
filename: '${{ env.ZIP_NAME }}-${{ env.TAG }}-GUI.zip'
exclusions: '*.git* .gitignore'
- name: Create Release Draft
id: create-release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG }}
name: ${{ env.TAG }}
body: |
Changelog
- First Change
- Second Change
draft: true
prerelease: false
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ env.TAG }} release/${{ env.ZIP_NAME }}-${{ env.TAG }}-Batch.zip
gh release upload ${{ env.TAG }} release_gui/${{ env.ZIP_NAME }}-${{ env.TAG }}-GUI.zip