Merge pull request #60 from th-ch/github-action

Add github action to build/release
This commit is contained in:
th-ch
2020-11-22 01:01:05 +01:00
committed by GitHub
5 changed files with 56 additions and 73 deletions

54
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,54 @@
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
uses: GabrielBB/xvfb-action@v1
with:
run: yarn test
- 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

View File

@ -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+$/"

View File

@ -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

View File

@ -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",

View File

@ -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)](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)