mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2024-12-23 22:22:59 +03:00
commit
0f708f9aa6
52
.github/workflows/build.sh
vendored
Executable file
52
.github/workflows/build.sh
vendored
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
OS=$NAME
|
||||
elif [ -f /etc/lsb-release ]; then
|
||||
. /etc/lsb-release
|
||||
OS=$DISTRIB_ID
|
||||
else
|
||||
OS=$(uname -s)
|
||||
fi
|
||||
|
||||
case $OS in
|
||||
"Ubuntu")
|
||||
echo Ubuntu
|
||||
apt-get update
|
||||
apt-get install -y jq curl p7zip-full nodejs npm unzip
|
||||
npm install -g @electron/asar
|
||||
sh ./build_deb.sh
|
||||
|
||||
mkdir dist
|
||||
mv deb/*.deb dist
|
||||
;;
|
||||
"Arch Linux")
|
||||
echo "Arch Linux"
|
||||
pacman -Syy --noconfirm
|
||||
pacman -S --noconfirm git sudo base-devel p7zip nodejs jq npm electron libpulse
|
||||
# fix access
|
||||
mkdir /.npm
|
||||
chown -R 65534:65534 "/.npm"
|
||||
# fix "asar: command not found"
|
||||
npm install -g @electron/asar
|
||||
# fix makepkg from non-root
|
||||
mkdir /home/build
|
||||
chgrp nobody /home/build
|
||||
chmod g+ws /home/build
|
||||
setfacl -m u::rwx,g::rwx /home/build
|
||||
setfacl -d --set u::rwx,g::rwx,o::- /home/build
|
||||
chown nobody .
|
||||
sudo -u nobody makepkg --log
|
||||
|
||||
mkdir dist
|
||||
mv *.pkg.tar.zst dist
|
||||
;;
|
||||
# "NixOS")
|
||||
# echo NixOS
|
||||
# nix build
|
||||
# ;;
|
||||
*)
|
||||
echo "Operating system is not recognized."
|
||||
;;
|
||||
esac
|
48
.github/workflows/build.yml
vendored
Normal file
48
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
container:
|
||||
- ubuntu:22.04
|
||||
- archlinux:latest
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ matrix.container }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: sh ./.github/workflows/build.sh
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ./dist/*
|
||||
nix-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v22
|
||||
|
||||
- name: Build
|
||||
run: nix build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ./result/*
|
0
build_deb.sh
Normal file → Executable file
0
build_deb.sh
Normal file → Executable file
Loading…
Reference in New Issue
Block a user