Skip to content

Create Release Build #144

Create Release Build

Create Release Build #144

Workflow file for this run

name: Create Release Build
on: [ workflow_dispatch, workflow_call ]
jobs:
get_version:
name: "Version"
uses: ./.github/workflows/get-version.yml
build_windows:
name: "Create Windows Build"
strategy:
matrix:
include:
- targets: x86_64-pc-windows-msvc
runner: windows-latest
artifact: windows-artifact
visual_c: https://aka.ms/vs/17/release/vc_redist.x64.exe
- targets: aarch64-pc-windows-msvc
runner: windows-11-arm
artifact: windows-artifact-arm
visual_c: https://aka.ms/vs/17/release/vc_redist.arm64.exe
runs-on: ${{ matrix.runner }}
needs: [ get_version ]
steps:
- name: Set architecture suffix
id: arch_suffix
shell: pwsh
run: |
if ("${{ matrix.targets }}" -eq "aarch64-pc-windows-msvc") {
echo "SUFFIX=-arm64" >> $env:GITHUB_ENV
} else {
echo "SUFFIX=" >> $env:GITHUB_ENV
}
# Firstly Checkout our Repository..
- name: "Check out GoXLR Utility"
uses: actions/checkout@v4
with:
path: goxlr-utility
# Now Checkout the App Wrappers repository..
- name: "Check out GoXLR Utility UI"
uses: actions/checkout@v4
with:
repository: goxlr-on-linux/goxlr-utility-ui-wrapper-app
path: goxlr-utility-ui
- name: "Install Rust"
uses: dtolnay/rust-toolchain@stable
- name: "Loading Cache"
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
goxlr-utility/target
key: ${{ runner.os }}-${{ matrix.targets }}-cargo-release-${{ hashFiles('goxlr-utility/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.targets }}-cargo-release-
- name: "Build Utility"
run: "cargo build --manifest-path=goxlr-utility/Cargo.toml --release --all-features"
# Build the UI into the same target directory..
- name: "Build UI"
run: "cargo build --manifest-path=goxlr-utility-ui/src-tauri/Cargo.toml --target-dir=goxlr-utility/target --release"
# Prepare NSIS
- name: Install NSIS
uses: repolevedavaj/[email protected]
with:
nsis-version: '3.11'
- name: "Preparing NSIS"
run: mkdir -p ${{ github.workspace }}/NSIS_Plugins/x86-unicode/
- name: "Downloading Tauri Utility Plugin"
uses: suisei-cn/[email protected]
with:
url: https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.1.1/nsis_tauri_utils.dll
target: ${{ github.workspace }}/NSIS_Plugins/x86-unicode/
- name: "Downloading WebView2 Bootstrapper"
uses: suisei-cn/[email protected]
with:
url: https://go.microsoft.com/fwlink/p/?LinkId=2124703
filename: MicrosoftEdgeWebview2Setup.exe
target: goxlr-utility/ci/nsis/
- name: "Downloading VC Runtime"
uses: suisei-cn/[email protected]
with:
url: ${{ matrix.visual_c }}
filename: vc_redist.exe
target: goxlr-utility/ci/nsis/
- name: "Build NSIS Packages"
uses: joncloud/makensis-action@publish
with:
additional-plugin-paths: ${{ github.workspace }}/NSIS_Plugins
script-file: goxlr-utility/ci/nsis/goxlr-utility.nsi
arguments: "/DPRODUCT_VERSION=${{ needs.get_version.outputs.version }}${{ env.SUFFIX }}"
- name: "Upload Installer"
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ./goxlr-utility/ci/Output/*.exe
build_linux:
name: "Create Linux Builds"
runs-on: ubuntu-22.04
needs: [ get_version ]
steps:
- name: "Check out Repository"
uses: actions/checkout@v4
- name: "Install Rust"
uses: dtolnay/rust-toolchain@stable
- name: "Install Required Libraries"
run: |
sudo apt-get update
sudo apt-get install libpulse0 libdbus-1-dev pkg-config libspeechd-dev
- name: "Loading Cache"
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('goxlr-utility/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-release-
- name: Install cargo-deb and cargo-generate-rpm
run: cargo install --force cargo-deb cargo-generate-rpm
- name: "Build Packages"
run: ./ci/build-packages
shell: bash
- name: "Upload DEB Artifact"
uses: actions/upload-artifact@v4
with:
name: debian-artifact
path: ./target/debian/*.deb
- name: "Upload RPM Artifact"
uses: actions/upload-artifact@v4
with:
name: rpm-artifact
path: ./target/generate-rpm/*.rpm
build_macos:
name: "Create MacOS Builds"
strategy:
matrix:
targets: [ x86_64-apple-darwin, aarch64-apple-darwin ]
runs-on: macos-latest
needs: [ get_version ]
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
with:
path: goxlr-utility
# Now Checkout the App Wrappers repository..
- name: "Check out GoXLR Utility UI"
uses: actions/checkout@v4
with:
repository: goxlr-on-linux/goxlr-utility-ui-wrapper-app
path: goxlr-utility-ui
- name: "Install Rust"
uses: dtolnay/rust-toolchain@stable
- name: "Loading Cache"
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
goxlr-utility/target
key: ${{ runner.os }}-${{ matrix.targets }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.targets }}-cargo-release-
- name: "Add rust target support"
run: rustup target add ${{ matrix.targets }}
- name: "Build Package"
run: ./goxlr-utility/ci/build-macos '${{ matrix.targets }}' '${{ needs.get_version.outputs.version }}'
shell: bash
- name: "Upload MacOS zip Artifact"
uses: actions/upload-artifact@v4
with:
name: macos-artifact-${{ matrix.targets }}
path: ./macos_binaries_*.tgz
package_macos:
name: "Package MacOS Binaries"
runs-on: macos-latest
needs: [ get_version, build_macos ]
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: "Download x86_64 Artifact"
uses: actions/download-artifact@v4
with:
name: "macos-artifact-x86_64-apple-darwin"
- name: "Download aarch64 Artifact"
uses: actions/download-artifact@v4
with:
name: "macos-artifact-aarch64-apple-darwin"
- name: "Install Packages App.."
run: |
wget http://s.sudre.free.fr/Software/files/Packages.dmg
hdiutil attach Packages.dmg
sudo installer -pkg /Volumes/Packages\ 1.2.10/Install\ Packages.pkg -target /
- name: "Build LIPO Binaries"
run: ./ci/build-macos-package '${{ needs.get_version.outputs.version }}'
shell: bash
- name: "Upload MacOS final Artifact"
uses: actions/upload-artifact@v4
with:
name: macos-artifact
path: ./goxlr-utility-macos-*.pkg
- name: "Remove x64 artifact"
uses: geekyeggo/[email protected]
with:
name: macos-artifact-x86_64-apple-darwin
- name: "Remove aarch artifact"
uses: geekyeggo/[email protected]
with:
name: macos-artifact-aarch64-apple-darwin