-
Notifications
You must be signed in to change notification settings - Fork 5
86 lines (74 loc) · 2.71 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
# This is a basic workflow to help you get started with Actions
name: build
# Controls when the workflow will run
on:
push:
tags:
- "v*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# APP name
APP_NAME: vvibe
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-windows:
permissions:
contents: write
# The type of runner that the job will run on
runs-on: windows-latest
env:
FFMPEG_DOWNLOAD_URL: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
FFMPEG_VERSION: latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install dependencies
run: |
$VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n"
Invoke-WebRequest "${env:FFMPEG_DOWNLOAD_URL}" -OutFile ffmpeg-release-full-shared.7z
7z x ffmpeg-release-full-shared.7z
mkdir ffmpeg
mv ffmpeg-*/* ffmpeg/
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n"
Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n"
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Copy ffmpeg dll to cargo dir
run: |
cp ffmpeg/bin/*.dll C:\Users\runneradmin\.cargo\bin
- uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Build
run: |
flutter config --enable-windows-desktop
flutter pub get
flutter build windows
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: "zip"
filename: vvibe-${{github.ref_name}}-windows-x64.zip
directory: build/windows/x64/runner/Release
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{github.ref_name}}
draft: true
prerelease: true
token: ${{ secrets.GH_TOKEN }}
files: |
build/windows/x64/runner/Release/vvibe-${{github.ref_name}}-windows-x64.zip
- name: Upload Release Asset
uses: actions/upload-artifact@v3
with:
name: artifact-windows
path: build/windows/x64/runner/Release/vvibe-${{github.ref_name}}-windows-x64.zip