Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Release Vector Audio #48

Release Vector Audio

Release Vector Audio #48

Workflow file for this run

name: Release Vector Audio
on:
release:
types: [published]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
BUILD_TYPE: Release
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set env (release)
if: github.event.release.prerelease == false
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set env (pre-release)
if: github.event.release.prerelease == true
run: |
echo "RELEASE_VERSION=v`cat VERSION_BETA`" >> $GITHUB_ENV
cat VERSION_BETA > VERSION
- name: Install SFML dependencies
run: |
sudo apt-get update
sudo apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev libgl1-mesa-dev libxcursor-dev freeglut3-dev pkg-config desktop-file-utils
sudo add-apt-repository universe
sudo apt-get update
sudo apt install libfuse2
- name: Configure cmake
run: |
cmake -S . -B build/ -DVCPKG_BUILD_TYPE=release -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVECTOR_SECRET=${{ env.VECTOR_SECRET }}
- name: Build cmake
run: |
cmake --build build/ --config ${{ env.BUILD_TYPE }}
- name: Bundle Linux
run: |
./bundle_linux.sh libafv_native.so
- name: Rename installer
run: |
mv VectorAudio-x86_64.AppImage VectorAudio-${{ github.ref_name }}-x86_64.AppImage
mv VectorAudio-x86_64.AppImage.zsync VectorAudio-${{ github.ref_name }}-x86_64.AppImage.zsync
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
VectorAudio-${{ github.ref_name }}-x86_64.AppImage
VectorAudio-${{ github.ref_name }}-x86_64.AppImage.zsync
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set env (release)
if: github.event.release.prerelease == false
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set env (pre-release)
if: github.event.release.prerelease == true
run: |
$ver = Get-Content .\VERSION_BETA -Raw
echo "RELEASE_VERSION=v$ver" >> $GITHUB_ENV
type VERSION_BETA > VERSION
- name: Configure cmake
run: |
cmake -S . -B build/ -DVCPKG_BUILD_TYPE=release -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build cmake
run: |
cmake --build build/ --config ${{ env.BUILD_TYPE }}
- name: Prepare windows installer
run: |
python collect_licenses.py
mkdir installer
cp resources/*.wav installer/
cp resources/favicon.ico installer/
cp resources/icon_win.png installer/
cp resources/*.ttf installer/
cp resources/airports.json installer/
cp resources/LICENSE.txt installer/
cp build/Release/vector_audio.exe installer/
cp build/Release/*.dll installer/
cp lib/windows/*.dll installer/
cp bundle_windows.nsi installer/install.nsi
- name: Create installer
run: |
cd installer/
makensis install.nsi
- name: Rename installer
run: |
mv installer/VectorAudio-installer.exe VectorAudio-${{ env.RELEASE_VERSION }}-Installer.exe
- name: Release
uses: softprops/action-gh-release@v1
with:
files: VectorAudio-${{ env.RELEASE_VERSION }}-Installer.exe
build-osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set env (release)
if: github.event.release.prerelease == false
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set env (pre-release)
if: github.event.release.prerelease == true
run: |
echo "RELEASE_VERSION=v`cat VERSION_BETA`" >> $GITHUB_ENV
cat VERSION_BETA > VERSION
- name: Install native dependencies
run: |
brew install pkg-config
- name: Run build script
run: |
./manual_osx_build.sh
mv VectorAudio-Universal.dmg VectorAudio-${{ env.RELEASE_VERSION }}-Universal.dmg
- name: Sign DMG
uses: lando/code-sign-action@v2
with:
file: VectorAudio-${{ env.RELEASE_VERSION }}-Universal.dmg
certificate-data: ${{ secrets.APPLE_CERT_DATA }}
certificate-password: ${{ secrets.APPLE_CERT_PASSWORD }}
apple-team-id: ${{ secrets.APPLE_TEAM_ID }}
options: --deep --timestamp --force
- name: Release
uses: softprops/action-gh-release@v1
with:
files: VectorAudio-${{ env.RELEASE_VERSION }}-Universal.dmg