Skip to content

Commit

Permalink
Migrate flatpak action to separate job (alvr-org#1810)
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieQLe authored Aug 27, 2023
1 parent 099e963 commit 1fb20c3
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ jobs:
RUST_BACKTRACE: 1
run: |
sudo apt-get update
sudo apt-get install libfuse2 build-essential pkg-config nasm libva-dev libdrm-dev libvulkan-dev libx264-dev libx265-dev cmake libasound2-dev libjack-jackd2-dev libxrandr-dev libunwind-dev libffmpeg-nvenc-dev nvidia-cuda-toolkit libgtk-3-dev flatpak flatpak-builder
sudo apt-get install libfuse2 build-essential pkg-config nasm libva-dev libdrm-dev libvulkan-dev libx264-dev libx265-dev cmake libasound2-dev libjack-jackd2-dev libxrandr-dev libunwind-dev libffmpeg-nvenc-dev nvidia-cuda-toolkit libgtk-3-dev
cp alvr/xtask/deb/cuda.pc /usr/share/pkgconfig
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
cargo xtask prepare-deps --platform linux
- name: Build and package ALVR (.tar.gz)
Expand Down Expand Up @@ -182,19 +181,35 @@ jobs:
asset_name: ALVR-x86_64.AppImage.zsync
asset_content_type: application/octet-stream

build_flatpak_bundle:
runs-on: ubuntu-latest
needs: [prepare_release]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ needs.prepare_release.outputs.release_ref }}

- name: Build and install dependencies
env:
RUST_BACKTRACE: 1
run: |
sudo apt-get update
sudo apt-get install flatpak flatpak-builder
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- name: Build and package ALVR flatpak (.flatpak)
id: build_flatpak
run: |
sudo flatpak-builder --repo=.flatpak-repo --install-deps-from=flathub --force-clean --default-branch=stable --arch=x86_64 .flatpak-build-dir alvr/xtask/flatpak/com.valvesoftware.Steam.Utility.alvr.json
flatpak build-bundle .flatpak-repo ./build/com.valvesoftware.Steam.Utility.alvr.flatpak com.valvesoftware.Steam.Utility.alvr stable --runtime
flatpak build-bundle .flatpak-repo com.valvesoftware.Steam.Utility.alvr.flatpak com.valvesoftware.Steam.Utility.alvr stable --runtime
- name: Upload flatpak streamer for Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/com.valvesoftware.Steam.Utility.alvr.flatpak
asset_path: com.valvesoftware.Steam.Utility.alvr.flatpak
asset_name: com.valvesoftware.Steam.Utility.alvr.flatpak
asset_content_type: application/octet-stream

Expand Down

0 comments on commit 1fb20c3

Please sign in to comment.