Skip to content

build

build #13

Workflow file for this run

# 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:
# 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.zip
directory: build/windows/runner/Release
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{github.ref_name}}
draft: true
prerelease: true
token: ${{ secrets.GH_TOKEN }}
files: |
build/windows/runner/Release/vvibe-${{github.ref_name}}-windows.zip
- name: Upload Release Asset
uses: actions/upload-artifact@v3
with:
name: artifact-windows
path: build/windows/runner/Release/vvibe-${{github.ref_name}}-windows.zip