From cd5016dc013495a19e4ac1fa4d7ffd99972f6e37 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Fri, 2 Feb 2024 13:27:57 +0300 Subject: [PATCH] Try to fix CI build Remove ubuntu fix nix-os container unzip dependency artifacts name fix updating package version fix fix branch name --- .github/workflows/build.sh | 26 +++++++++++--------------- .github/workflows/build.yml | 20 ++++++++++++++------ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 4449899..6b6c996 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -11,20 +11,10 @@ else fi case $OS in - "Ubuntu") - echo Ubuntu - apt-get update - apt-get install -y jq curl p7zip-full nodejs npm unzip jq - npm install -g @electron/asar - sh ./build_deb.sh -a all - - 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 + pacman -S --noconfirm git sudo base-devel p7zip nodejs jq npm electron libpulse dpkg unzip # fix access mkdir /.npm chown -R 65534:65534 "/.npm" @@ -37,15 +27,21 @@ case $OS in setfacl -m u::rwx,g::rwx /home/build setfacl -d --set u::rwx,g::rwx,o::- /home/build chown nobody . + sh ./generate_packages.sh sudo -u nobody makepkg --log mkdir dist mv *.pkg.tar.zst dist + + sh ./build_deb.sh -a all + mv deb/*.deb dist + ;; + "Ubuntu") + echo NixOS + sh ./generate_packages.sh + export NIXPKGS_ALLOW_UNFREE=1 + nix build --impure ;; -# "NixOS") -# echo NixOS -# nix build -# ;; *) echo "Operating system is not recognized." ;; diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 717381e..928f236 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: - '*' push: branches: - - 'main' + - 'master' jobs: @@ -14,7 +14,6 @@ jobs: strategy: matrix: container: - - ubuntu:22.04 - archlinux:latest runs-on: ubuntu-latest container: @@ -26,10 +25,18 @@ jobs: - name: Build run: sh ./.github/workflows/build.sh - - name: Upload artifact + - name: Upload Arch artifact uses: actions/upload-artifact@v4 with: - path: ./dist/* + path: ./dist/*.pkg.tar.zst + name: arch-packages + + - name: Upload Deb artifact + uses: actions/upload-artifact@v4 + with: + path: ./dist/*.deb + name: deb-packages + nix-build: runs-on: ubuntu-latest env: @@ -42,9 +49,10 @@ jobs: uses: cachix/install-nix-action@v22 - name: Build - run: nix build + run: sh ./.github/workflows/build.sh - name: Upload artifact uses: actions/upload-artifact@v4 with: - path: ./result/* \ No newline at end of file + path: ./result/* + name: nix-package \ No newline at end of file