Compare commits

...

3 commits

Author SHA1 Message Date
Raivis Dejus c664221563
Updating manual build actions (#783) 2024-06-06 07:44:23 +00:00
Raivis Dejus 7bb835ad04
Adding snap build to manual build action (#782) 2024-06-06 09:48:10 +03:00
Raivis Dejus 74e629bf9a
Adding manual build github action (#781) 2024-06-06 08:56:12 +03:00
2 changed files with 106 additions and 0 deletions

90
.github/workflows/manual-build.yml vendored Normal file
View file

@ -0,0 +1,90 @@
---
name: Manual Build
on: workflow_dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
- os: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: "3.10.11"
- name: Install Poetry Action
uses: snok/install-poetry@v1.3.1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-2
- uses: FedericoCarboni/setup-ffmpeg@v3.1
id: setup-ffmpeg
with:
ffmpeg-version: release
architecture: 'x64'
github-token: ${{ github.server_url == 'https://github.com' && github.token || '' }}
- name: Install dependencies
run: poetry install
- name: Bundle
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install create-dmg
poetry run make bundle_mac_unsigned
elif [ "$RUNNER_OS" == "Windows" ]; then
poetry run make bundle_windows
fi
shell: bash
- uses: actions/upload-artifact@v4
with:
name: Buzz-${{ runner.os }}
path: |
dist/Buzz*-windows.exe
dist/Buzz*-mac.dmg
build-snap:
runs-on: ubuntu-latest
outputs:
snap: ${{ steps.snapcraft.outputs.snap }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: snapcore/action-build@v1
id: snapcraft
- run: |
sudo apt-get update
sudo apt-get install libportaudio2
- run: sudo snap install --devmode *.snap
- run: |
cd $HOME
xvfb-run buzz --version
- uses: actions/upload-artifact@v4
with:
name: snap
path: ${{ steps.snapcraft.outputs.snap }}

View file

@ -10,6 +10,8 @@ bundle_windows: dist/Buzz
bundle_mac: dist/Buzz.app codesign_all_mac zip_mac notarize_zip staple_app_mac dmg_mac
bundle_mac_unsigned: dist/Buzz.app zip_mac dmg_mac_unsigned
UNAME_S := $(shell uname -s)
LIBWHISPER :=
@ -95,6 +97,20 @@ dmg_mac:
"${mac_dmg_path}" \
"dist/dmg/"
dmg_mac_unsigned:
ditto -x -k "${mac_zip_path}" dist/dmg
create-dmg \
--volname "Buzz" \
--volicon "./assets/buzz.icns" \
--window-pos 200 120 \
--window-size 600 300 \
--icon-size 100 \
--icon "Buzz.app" 175 120 \
--hide-extension "Buzz.app" \
--app-drop-link 425 120 \
"${mac_dmg_path}" \
"dist/dmg/"
staple_app_mac:
xcrun stapler staple ${mac_app_path}