From 4d7f1cf6ff7ee0ae4dc0c374c271a0b78929ae20 Mon Sep 17 00:00:00 2001 From: Yury Shvedov Date: Sun, 4 Feb 2024 11:29:51 +0300 Subject: [PATCH 1/4] Add fixes to nix workflow Previous workflow actually did not check nix build. Change-Id: I4a9fc3c8a7fcf17aec1328fcc5f340061ac86468 --- .github/workflows/build.yml | 22 ++++++++++++---------- flake.nix | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e216ab3..bc711e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: with: path: ./dist/*.pkg.tar.zst name: arch-packages - + - name: Upload Deb artifact uses: actions/upload-artifact@v4 with: @@ -53,16 +53,18 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ (inputs.ref || '') }} - + - name: Install nix uses: cachix/install-nix-action@v22 - - name: Build - run: sh ./.github/workflows/build.sh - - - name: Upload artifact - uses: actions/upload-artifact@v4 + - uses: cachix/cachix-action@v12 with: - path: ./result/* - name: nix-package - \ No newline at end of file + name: yandexmisic + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build yandexmusic + run: NIXPKGS_ALLOW_UNFREE=1 nix build --impure .#yandexmusic + - name: Build yandexmusic background + run: NIXPKGS_ALLOW_UNFREE=1 nix build --impure .#yandexmusic-background + - name: Build yandexmusic without flakes binaries + run: NIXPKGS_ALLOW_UNFREE=1 nix build --impure .#yandexmusic-noflakes + diff --git a/flake.nix b/flake.nix index e29165b..9357f45 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ { packages = rec { yandexmusic = yandexmusic-with pkgs; - yandexmusic-backgroud = yandexmusic.override { + yandexmusic-background = yandexmusic.override { fixQuit = false; }; yandexmusic-noflakes = pkgs.callPackage ./nix {}; From a0ef6c0ad9d7b7ff9cfdf9933e575bf71b116ab9 Mon Sep 17 00:00:00 2001 From: Yury Shvedov Date: Sun, 4 Feb 2024 12:48:49 +0300 Subject: [PATCH 2/4] Fix update build for nix Change-Id: I93b7657052ed8bcdccc852018f6c79307692ba8d --- .github/workflows/update-build-release.yml | 10 +++++----- generate_packages.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-build-release.yml b/.github/workflows/update-build-release.yml index fecb61f..61eaad5 100644 --- a/.github/workflows/update-build-release.yml +++ b/.github/workflows/update-build-release.yml @@ -19,7 +19,7 @@ jobs: run: pacman -Syy --noconfirm - name: Install deps - run: pacman -S --noconfirm git jq + run: pacman -S --noconfirm git jq nix - name: Checkout uses: actions/checkout@v4 @@ -41,14 +41,14 @@ jobs: outputs: new_version: ${{ steps.commit.outputs.commited }} commit_long_sha: ${{ steps.commit.outputs.commit_long_sha }} - + build: if: ${{ (github.event_name == 'push') || (needs.update_packages.new_version) }} needs: update_packages uses: ./.github/workflows/build.yml with: ref: ${{ (needs.update_packages.commit_long_sha || '') }} - + upload-release: needs: build runs-on: ubuntu-latest @@ -69,7 +69,7 @@ jobs: sudo apt-get update sudo apt-get install jq sh ./.github/workflows/retrieve_version.sh - + - name: Tag Repo uses: richardsimko/update-tag@v1 with: @@ -86,4 +86,4 @@ jobs: name: ${{ env.release_name }} replacesArtifacts: true tag: ${{ env.tag_name }} - \ No newline at end of file + diff --git a/generate_packages.sh b/generate_packages.sh index 823e51b..b3c4b83 100644 --- a/generate_packages.sh +++ b/generate_packages.sh @@ -73,7 +73,7 @@ update_pkbuild() { update_flake() { sed -i 's#\(ymExe\.url\s*=\s*\).*;#\1'"$exe_link"';#' ./flake.nix if check_dep nix; then - nix flake lock --update-input ymExe + nix --extra-experimental-features 'nix-command flakes' flake update else echo "flake.nix was updated, but nix not installed to update flake.lock" fi From b6f6d63d61d452f4c1b2289422d3387742ab2f9e Mon Sep 17 00:00:00 2001 From: Yury Shvedov Date: Sun, 4 Feb 2024 13:22:57 +0300 Subject: [PATCH 3/4] [workflows] Fix error handling Previously errors in actions was ignored Change-Id: Ida263df740077926bcd8fd79a725f0cac447e59d --- .github/workflows/build.sh | 6 ++++-- .github/workflows/retrieve_version.sh | 4 +++- .github/workflows/update_packages.sh | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 7f6b457..ec4111b 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + if [ -f /etc/os-release ]; then . /etc/os-release OS=$NAME @@ -28,7 +30,7 @@ case $OS in setfacl -d --set u::rwx,g::rwx,o::- /home/build chown nobody . sudo -u nobody makepkg --log - + mkdir dist mv *.pkg.tar.zst dist @@ -45,4 +47,4 @@ case $OS in *) echo "Operating system is not recognized." ;; -esac \ No newline at end of file +esac diff --git a/.github/workflows/retrieve_version.sh b/.github/workflows/retrieve_version.sh index 9c9196d..c765f43 100644 --- a/.github/workflows/retrieve_version.sh +++ b/.github/workflows/retrieve_version.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + # get version VERSION=$(jq -r '.version' version_info.json) release_name="Beta $VERSION" @@ -8,4 +10,4 @@ tag_name="v$VERSION" #write variables to github env echo "VERSION=$VERSION" >> $GITHUB_ENV echo "release_name=$release_name" >> $GITHUB_ENV -echo "tag_name=$tag_name" >> $GITHUB_ENV \ No newline at end of file +echo "tag_name=$tag_name" >> $GITHUB_ENV diff --git a/.github/workflows/update_packages.sh b/.github/workflows/update_packages.sh index 7c8b11c..fa5c6b6 100644 --- a/.github/workflows/update_packages.sh +++ b/.github/workflows/update_packages.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + if [ -f /etc/os-release ]; then . /etc/os-release OS=$NAME @@ -20,4 +22,4 @@ case $OS in *) echo "Operating system is not recognized." ;; -esac \ No newline at end of file +esac From 16a03bfd4f507ecacd4b6ca9005aa05e896372c7 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 4 Feb 2024 10:36:52 +0000 Subject: [PATCH 4/4] Update packages to Beta 5.0.9 --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 65b45f8..195eb3e 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -19,11 +19,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", + "lastModified": 1706925685, + "narHash": "sha256-hVInjWMmgH4yZgA4ZtbgJM1qEAel72SYhP5nOWX4UIM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", + "rev": "79a13f1437e149dc7be2d1290c74d378dad60814", "type": "github" }, "original": { @@ -56,13 +56,13 @@ "ymExe": { "flake": false, "locked": { - "narHash": "sha256-HeqFJ+hY/8TjViz6SjfklMoVpX6+54pL0Vl1cI1Qlkw=", + "narHash": "sha256-ZHjUm3Z86DIE1AcJ0NrKROesFR2ejll+stTeCHMz+Hs=", "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.8.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.9.exe" }, "original": { "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.8.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.9.exe" } } },