2023-07-15 17:31:33 -07:00
|
|
|
name: Build
|
|
|
|
run-name: Build the project
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2023-07-15 18:22:25 -07:00
|
|
|
runs-on: ubuntu-latest
|
2023-07-15 17:31:33 -07:00
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v3
|
2023-07-15 18:46:18 -07:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-07-18 20:25:24 -07:00
|
|
|
- name: Cache system dependencies
|
|
|
|
uses: actions/cache@v3
|
2023-07-18 20:30:23 -07:00
|
|
|
id: cache-system
|
2023-07-18 20:25:24 -07:00
|
|
|
with:
|
2023-07-18 20:30:23 -07:00
|
|
|
key: cache-system
|
2023-07-18 20:27:44 -07:00
|
|
|
path: /var/cache/apt
|
2023-07-18 20:25:24 -07:00
|
|
|
- name: Cache flatpak dependencies
|
|
|
|
uses: actions/cache@v3
|
2023-07-18 20:30:23 -07:00
|
|
|
id: cache-flatpak
|
2023-07-18 20:25:24 -07:00
|
|
|
with:
|
2023-07-18 20:30:23 -07:00
|
|
|
key: cache-flatpak
|
2023-07-18 20:27:44 -07:00
|
|
|
path: /var/lib/flatpak/
|
2023-07-18 20:43:45 -07:00
|
|
|
- name: Install system dependencies
|
|
|
|
run: apt update && apt install -y flatpak-builder flatpak python3-aiohttp python3-tenacity libostree-1-1 python3-gi gir1.2-ostree-1.0 wget
|
|
|
|
- name: Add flathub repo and install flatpak dependencies
|
|
|
|
run: flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
|
|
- name: Build project
|
|
|
|
run: flatpak-builder --install-deps-from flathub build-flatpak com.experimentalcraft.NekoPlayer.yml --repo ./flatpak-repo
|
2023-07-18 14:19:22 -07:00
|
|
|
- name: Download uploading script
|
|
|
|
run: wget https://raw.githubusercontent.com/flatpak/flat-manager/9401efbdc0d6bd489507d8401c567ba219d735d5/flat-manager-client -O flat-manager-client && chmod +x flat-manager-client
|
|
|
|
- name: Upload to flatpak repo
|
2023-07-18 19:28:18 -07:00
|
|
|
run: ./flat-manager-client -v --token $FLATPAK_TOKEN push --commit --publish $(./flat-manager-client -v --token $FLATPAK_TOKEN create http://192.168.122.249:8080 nightly) ./flatpak-repo/
|
2023-07-18 20:21:18 -07:00
|
|
|
env:
|
|
|
|
FLATPAK_TOKEN: ${{ secrets.FLATPAK_TOKEN }}
|
2023-07-15 18:54:21 -07:00
|
|
|
#- uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: build
|
|
|
|
# path: builddir/player
|