-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (84 loc) · 2.76 KB
/
build-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
on:
release:
types: [created]
permissions:
contents: write
packages: write
jobs:
release-linux:
name: Release Linux Binary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>=1.20'
- name: Prepare archive directory
run: |
mkdir filediver
cp README.md LICENSE filediver/
- name: Build Executable
run: GOOS=linux GOARCH=amd64 go build -o filediver/filediver ./cmd/filediver-cli
- name: Create archive
run: zip -r filediver-linux-amd64.zip filediver/
- name: Upload archive
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: filediver-linux-amd64.zip
release-windows:
name: Release Windows Binary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>=1.20'
- name: Prepare archive directory
run: |
mkdir filediver
cp README.md LICENSE filediver/
- name: Build Executable
run: GOOS=windows GOARCH=amd64 go build -o filediver/filediver.exe ./cmd/filediver-cli
- name: Download FFmpeg binary
run: |
wget https://github.com/GyanD/codexffmpeg/releases/download/6.1.1/ffmpeg-6.1.1-essentials_build.zip
unzip ffmpeg-6.1.1-essentials_build.zip ffmpeg-6.1.1-essentials_build/bin/ffmpeg.exe
mv ffmpeg-6.1.1-essentials_build/bin/ffmpeg.exe filediver/
- name: Create archive
run: zip -r filediver-windows-amd64.zip filediver/
- name: Upload archive
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: filediver-windows-amd64.zip
release-scripts-dist-windows:
name: Release Helper Scripts (Windows)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv by astral.sh
run: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- name: Build hd2_accurate_blender_importer executable
run: |
uv venv --python 3.11
uv pip install pyinstaller bpy "numpy<2"
uv run pyinstaller `
-D --distpath ./scripts_dist `
./scripts/hd2_accurate_blender_importer.py `
--add-data ./scripts/resources:resources `
--collect-all bpy `
--collect-submodules logging
- name: Create scripts_dist archive
run: |
7z a scripts_dist_windows.zip ./scripts_dist
- name: Upload archive
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: scripts_dist_windows.zip