mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-17 09:25:17 +00:00
69 lines
2.6 KiB
YAML
69 lines
2.6 KiB
YAML
name: audioplayers integration build
|
|
on:
|
|
push:
|
|
branches:
|
|
- audioplayers_integration
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_ubuntu:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: subosito/flutter-action@v2.2.0
|
|
with:
|
|
cache: true
|
|
- run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y tar clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
|
|
- run: flutter config --enable-linux-desktop
|
|
- run: flutter pub get
|
|
- run: dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
|
- run: flutter clean
|
|
- run: flutter build linux
|
|
- run: make tar
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Spotube-Linux-Bundle
|
|
path: build/Spotube-linux-x86_64.tar.xz
|
|
build_windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Get latest tag
|
|
id: tag
|
|
uses: dawidd6/action-get-tag@v1
|
|
with:
|
|
# Optionally strip `v` prefix
|
|
strip_v: true
|
|
# Replace Version in files
|
|
- run: |
|
|
choco install sed make -y
|
|
sed -i "s/%{{SPOTUBE_VERSION}}%/${{ steps.tag.outputs.tag }}/" windows/runner/Runner.rc
|
|
sed -i "s/%{{SPOTUBE_VERSION}}%/${{ steps.tag.outputs.tag }}/" choco-struct/tools/VERIFICATION.txt
|
|
sed -i "s/%{{SPOTUBE_VERSION}}%/${{ steps.tag.outputs.tag }}/" choco-struct/spotube.nuspec
|
|
|
|
# Build Windows Executable
|
|
- uses: subosito/flutter-action@v2.2.0
|
|
with:
|
|
cache: true
|
|
- run: |
|
|
flutter config --enable-windows-desktop
|
|
flutter pub get
|
|
dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
|
dart pub global activate flutter_distributor
|
|
make innoinstall
|
|
flutter_distributor package --platform=windows --targets=exe --skip-clean
|
|
|
|
# Create Chocolatey Package
|
|
# setting the sha256 hash for new bundle
|
|
- run: |
|
|
mv dist/**/spotube-*-windows-setup.exe dist/Spotube-windows-x86_64-setup.exe
|
|
Set-Variable -Name HASH -Value (Get-FileHash dist\Spotube-windows-x86_64-setup.exe).Hash
|
|
sed -i "s/%{{WIN_SHA256}}%/$HASH/" choco-struct/tools/VERIFICATION.txt
|
|
|
|
# Upload artifacts
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Spotube-Windows-Bundle
|
|
path: dist/ |