From fc4754a1709e6eb70d662f89eafd360aa4a77aa2 Mon Sep 17 00:00:00 2001 From: TC Date: Sat, 21 Nov 2020 23:38:04 +0100 Subject: [PATCH 1/7] GH action to build/release --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..11cf5c4f33 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build YouTube Music + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: Build YouTube Music + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Setup NodeJS + uses: actions/setup-node@v1 + with: + node-version: "12.x" + + - name: Install dependencies + run: yarn --frozen-lockfile + + - name: Test + run: yarn test + + - name: Build on Mac + if: startsWith(matrix.os, 'macOS') + run: | + yarn run release:mac + + - name: Build on Linux + if: startsWith(matrix.os, 'ubuntu') + run: | + yarn run release:linux + + - name: Build on Windows + if: startsWith(matrix.os, 'windows') + run: | + yarn run release:win From 27255dc4776fec0c677080bd39b3ce8665873c94 Mon Sep 17 00:00:00 2001 From: TC Date: Sat, 21 Nov 2020 23:53:36 +0100 Subject: [PATCH 2/7] Add GH token env var from secret --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11cf5c4f33..b79c11013e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,15 +32,21 @@ jobs: - name: Build on Mac if: startsWith(matrix.os, 'macOS') + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | yarn run release:mac - name: Build on Linux if: startsWith(matrix.os, 'ubuntu') + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | yarn run release:linux - name: Build on Windows if: startsWith(matrix.os, 'windows') + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | yarn run release:win From 575dc5177dbf004e6be9e96a84bcafd4bb5af519 Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 22 Nov 2020 00:04:08 +0100 Subject: [PATCH 3/7] Use xvfb to run tests on linux --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b79c11013e..fed2e3f605 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,9 @@ jobs: run: yarn --frozen-lockfile - name: Test - run: yarn test + uses: GabrielBB/xvfb-action@v1 + with: + run: yarn test - name: Build on Mac if: startsWith(matrix.os, 'macOS') From 3da76020b1995852678dc9aa177da0b29a4e9484 Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 22 Nov 2020 00:13:46 +0100 Subject: [PATCH 4/7] Bump version (new release through GH actions) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a76235d8e..b1fd82e104 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "youtube-music", "productName": "YouTube Music", - "version": "1.6.1", + "version": "1.6.2", "description": "YouTube Music Desktop App - including custom plugins", "license": "MIT", "repository": "th-ch/youtube-music", From 941dd90d77a5c46ed5505918374693fcd892af1f Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 22 Nov 2020 00:14:28 +0100 Subject: [PATCH 5/7] Delete AppVeyor/Travis CI integration --- .travis.yml | 38 -------------------------------------- appveyor.yml | 32 -------------------------------- 2 files changed, 70 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 019946009d..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: node_js -node_js: "12" -env: - - ELECTRON_CACHE=$HOME/.cache/electron ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder - -jobs: - include: - - os: osx - osx_image: xcode11.3 - - os: linux - dist: xenial - services: - - xvfb - -cache: - yarn: false - directories: - - $HOME/.cache/electron - - $HOME/.cache/electron-builder - -script: - - | - yarn test - if [ "$TRAVIS_OS_NAME" == "linux" ]; then - yarn run release:linux - else - yarn run release:mac - fi -before_cache: - - rm -rf $HOME/.cache/electron-builder -before_install: - - rm -rf node_modules - # Install dependencies - - travis_wait 30 yarn --frozen-lockfile - -branches: - except: - - "/^v\\d+\\.\\d+\\.\\d+$/" diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index e3b821c1ec..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,32 +0,0 @@ -image: Visual Studio 2019 - -platform: - - x64 - -cache: - - node_modules - - '%USERPROFILE%\.electron' - -init: - - git config --global core.autocrlf input - -install: - # Install node - - ps: Install-Product node 12 x64 - # Install dependencies - - yarn --frozen-lockfile - -# on_finish: -# # Enable RDP to the build worker (using APPVEYOR_RDP_PASSWORD env var) -# # https://www.appveyor.com/docs/how-to/rdp-to-build-worker/ -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - -# @FIXME: tests disabled because app fails to launch on AppVeyor/Windows -# os: unstable # https://github.com/electron-userland/spectron#on-appveyor -# test_script: -# - yarn test - -build_script: - - yarn run release:win - -test: off From 235150a0cc3e39d9f987b4f71d100a87ba5f56f0 Mon Sep 17 00:00:00 2001 From: th-ch Date: Sun, 22 Nov 2020 00:24:57 +0100 Subject: [PATCH 6/7] Update build badge (GitHub Actions) --- readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 3e31b91f54..19aabb9c51 100644 --- a/readme.md +++ b/readme.md @@ -3,8 +3,7 @@ [![GitHub release](https://img.shields.io/github/release/th-ch/youtube-music.svg)](https://GitHub.com/th-ch/youtube-music/releases/) [![GitHub license](https://img.shields.io/github/license/th-ch/youtube-music.svg)](https://github.com/th-ch/youtube-music/blob/master/LICENSE) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) -[![Build status](https://ci.appveyor.com/api/projects/status/tgre12r150ynvwl2?svg=true)](https://ci.appveyor.com/project/th-ch/youtube-music) -[![Build Status](https://travis-ci.org/th-ch/youtube-music.svg?branch=master)](https://travis-ci.org/th-ch/youtube-music) +![Build status](https://github.com/th-ch/youtube-music/workflows/Build%20YouTube%20Music/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/th-ch/youtube-music/badge.svg)](https://snyk.io/test/github/th-ch/youtube-music) ![GitHub All Releases](https://img.shields.io/github/downloads/th-ch/youtube-music/total) From 3441a6f215b7b8319a33d7182086fd867e675ae3 Mon Sep 17 00:00:00 2001 From: th-ch Date: Sun, 22 Nov 2020 00:40:47 +0100 Subject: [PATCH 7/7] Link build badge to releases --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 19aabb9c51..6b99c01e47 100644 --- a/readme.md +++ b/readme.md @@ -3,7 +3,7 @@ [![GitHub release](https://img.shields.io/github/release/th-ch/youtube-music.svg)](https://GitHub.com/th-ch/youtube-music/releases/) [![GitHub license](https://img.shields.io/github/license/th-ch/youtube-music.svg)](https://github.com/th-ch/youtube-music/blob/master/LICENSE) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) -![Build status](https://github.com/th-ch/youtube-music/workflows/Build%20YouTube%20Music/badge.svg) +[![Build status](https://github.com/th-ch/youtube-music/workflows/Build%20YouTube%20Music/badge.svg)](https://GitHub.com/th-ch/youtube-music/releases/) [![Known Vulnerabilities](https://snyk.io/test/github/th-ch/youtube-music/badge.svg)](https://snyk.io/test/github/th-ch/youtube-music) ![GitHub All Releases](https://img.shields.io/github/downloads/th-ch/youtube-music/total)