-
-
Notifications
You must be signed in to change notification settings - Fork 1
141 lines (119 loc) · 4.25 KB
/
Build-All-Platforms.yaml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Build-All-Platforms
on:
workflow_dispatch:
permissions:
contents: write
jobs:
create_release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12.8"
- name: Extract version
id: get_version
run: echo "version=$(python -c 'import src.version; print(src.version.__version__)')" >> $GITHUB_ENV
- name: Print version
id: print_version
run: echo ${{ steps.get_version.outputs.version }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS }}
with:
tag_name: TAS_${{ env.version }}
release_name: TAS_${{ env.version }}
draft: true
build_full_windows:
needs: create_release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12.8"
- name: Run full build script
run: python build.py
- name: Compress full directory
run: |
cd ${{ github.workspace }}/dist-full/main/
7z a -t7z -m0=lzma2 -mx=9 -ms=1536m -md=273m ../../TAS_${{ needs.create_release.outputs.version }}_Full_Windows.7z *
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: TAS_${{ needs.create_release.outputs.version }}_Full_Windows.7z
asset_name: TAS_${{ needs.create_release.outputs.version }}_Full_Windows.7z
asset_content_type: application/x-7z-compressed
build_lite_windows:
needs: create_release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12.8"
- name: Run lite build script
run: python build-lite.py
- name: Compress lite directory
run: |
cd ${{ github.workspace }}/dist-lite/main/
7z a -t7z -m0=lzma2 -mx=9 -ms=1536m -md=273m ../../TAS_${{ needs.create_release.outputs.version }}_Lite_Windows.7z *
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: TAS_${{ needs.create_release.outputs.version }}_Lite_Windows.7z
asset_name: TAS_${{ needs.create_release.outputs.version }}_Lite_Windows.7z
asset_content_type: application/x-7z-compressed
build_lite_linux:
needs: create_release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12.8"
- name: Run lite build script
run: python build-linux-lite.py
- name: Compress lite directory
run: |
cd ${{ github.workspace }}/dist-lite/main/
7z a -t7z -m0=lzma2 -mx=9 -ms=1536m -md=273m ../../TAS_${{ needs.create_release.outputs.version }}_Lite_Linux.7z *
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: TAS_${{ needs.create_release.outputs.version }}_Lite_Linux.7z
asset_name: TAS_${{ needs.create_release.outputs.version }}_Lite_Linux.7z
asset_content_type: application/x-7z-compressed