0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 22:22:59 +03:00

Merge pull request #30 from ein-shved/master

[workflows] Some fixes
This commit is contained in:
Andrey Onishchenko 2024-02-04 13:51:45 +03:00 committed by GitHub
commit fd718d1653
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 38 additions and 30 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
if [ -f /etc/os-release ]; then if [ -f /etc/os-release ]; then
. /etc/os-release . /etc/os-release
OS=$NAME OS=$NAME
@ -28,7 +30,7 @@ case $OS in
setfacl -d --set u::rwx,g::rwx,o::- /home/build setfacl -d --set u::rwx,g::rwx,o::- /home/build
chown nobody . chown nobody .
sudo -u nobody makepkg --log sudo -u nobody makepkg --log
mkdir dist mkdir dist
mv *.pkg.tar.zst dist mv *.pkg.tar.zst dist
@ -45,4 +47,4 @@ case $OS in
*) *)
echo "Operating system is not recognized." echo "Operating system is not recognized."
;; ;;
esac esac

View File

@ -31,7 +31,7 @@ jobs:
with: with:
path: ./dist/*.pkg.tar.zst path: ./dist/*.pkg.tar.zst
name: arch-packages name: arch-packages
- name: Upload Deb artifact - name: Upload Deb artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@ -53,16 +53,18 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ (inputs.ref || '') }} ref: ${{ (inputs.ref || '') }}
- name: Install nix - name: Install nix
uses: cachix/install-nix-action@v22 uses: cachix/install-nix-action@v22
- name: Build - uses: cachix/cachix-action@v12
run: sh ./.github/workflows/build.sh
- name: Upload artifact
uses: actions/upload-artifact@v4
with: with:
path: ./result/* name: yandexmisic
name: nix-package 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

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
# get version # get version
VERSION=$(jq -r '.version' version_info.json) VERSION=$(jq -r '.version' version_info.json)
release_name="Beta $VERSION" release_name="Beta $VERSION"
@ -8,4 +10,4 @@ tag_name="v$VERSION"
#write variables to github env #write variables to github env
echo "VERSION=$VERSION" >> $GITHUB_ENV echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "release_name=$release_name" >> $GITHUB_ENV echo "release_name=$release_name" >> $GITHUB_ENV
echo "tag_name=$tag_name" >> $GITHUB_ENV echo "tag_name=$tag_name" >> $GITHUB_ENV

View File

@ -19,7 +19,7 @@ jobs:
run: pacman -Syy --noconfirm run: pacman -Syy --noconfirm
- name: Install deps - name: Install deps
run: pacman -S --noconfirm git jq run: pacman -S --noconfirm git jq nix
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -41,14 +41,14 @@ jobs:
outputs: outputs:
new_version: ${{ steps.commit.outputs.commited }} new_version: ${{ steps.commit.outputs.commited }}
commit_long_sha: ${{ steps.commit.outputs.commit_long_sha }} commit_long_sha: ${{ steps.commit.outputs.commit_long_sha }}
build: build:
if: ${{ (github.event_name == 'push') || (needs.update_packages.new_version) }} if: ${{ (github.event_name == 'push') || (needs.update_packages.new_version) }}
needs: update_packages needs: update_packages
uses: ./.github/workflows/build.yml uses: ./.github/workflows/build.yml
with: with:
ref: ${{ (needs.update_packages.commit_long_sha || '') }} ref: ${{ (needs.update_packages.commit_long_sha || '') }}
upload-release: upload-release:
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -69,7 +69,7 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install jq sudo apt-get install jq
sh ./.github/workflows/retrieve_version.sh sh ./.github/workflows/retrieve_version.sh
- name: Tag Repo - name: Tag Repo
uses: richardsimko/update-tag@v1 uses: richardsimko/update-tag@v1
with: with:
@ -86,4 +86,4 @@ jobs:
name: ${{ env.release_name }} name: ${{ env.release_name }}
replacesArtifacts: true replacesArtifacts: true
tag: ${{ env.tag_name }} tag: ${{ env.tag_name }}

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
if [ -f /etc/os-release ]; then if [ -f /etc/os-release ]; then
. /etc/os-release . /etc/os-release
OS=$NAME OS=$NAME
@ -20,4 +22,4 @@ case $OS in
*) *)
echo "Operating system is not recognized." echo "Operating system is not recognized."
;; ;;
esac esac

View File

@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1705309234,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -19,11 +19,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1704874635, "lastModified": 1706925685,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", "narHash": "sha256-hVInjWMmgH4yZgA4ZtbgJM1qEAel72SYhP5nOWX4UIM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", "rev": "79a13f1437e149dc7be2d1290c74d378dad60814",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -56,13 +56,13 @@
"ymExe": { "ymExe": {
"flake": false, "flake": false,
"locked": { "locked": {
"narHash": "sha256-HeqFJ+hY/8TjViz6SjfklMoVpX6+54pL0Vl1cI1Qlkw=", "narHash": "sha256-ZHjUm3Z86DIE1AcJ0NrKROesFR2ejll+stTeCHMz+Hs=",
"type": "file", "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": { "original": {
"type": "file", "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"
} }
} }
}, },

View File

@ -18,7 +18,7 @@
{ {
packages = rec { packages = rec {
yandexmusic = yandexmusic-with pkgs; yandexmusic = yandexmusic-with pkgs;
yandexmusic-backgroud = yandexmusic.override { yandexmusic-background = yandexmusic.override {
fixQuit = false; fixQuit = false;
}; };
yandexmusic-noflakes = pkgs.callPackage ./nix {}; yandexmusic-noflakes = pkgs.callPackage ./nix {};

View File

@ -73,7 +73,7 @@ update_pkbuild() {
update_flake() { update_flake() {
sed -i 's#\(ymExe\.url\s*=\s*\).*;#\1'"$exe_link"';#' ./flake.nix sed -i 's#\(ymExe\.url\s*=\s*\).*;#\1'"$exe_link"';#' ./flake.nix
if check_dep nix; then if check_dep nix; then
nix flake lock --update-input ymExe nix --extra-experimental-features 'nix-command flakes' flake update
else else
echo "flake.nix was updated, but nix not installed to update flake.lock" echo "flake.nix was updated, but nix not installed to update flake.lock"
fi fi