-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
173 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,86 @@ | ||
name: build | ||
name: dev build job | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
tags: | ||
- v* | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
mac_build: | ||
runs-on: macos-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3.4.1 | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: '16.x' | ||
cache: 'npm' | ||
|
||
- name: Build/release Electron app | ||
uses: samuelmeuli/action-electron-builder@v1.6.0 | ||
# env: | ||
# VUE_APP_API_DEV_ELECTRON: http://localhost:12138 | ||
# VUE_APP_API_PRODUCT_ELECTRON: http://127.0.0.1:12138 | ||
with: | ||
# GitHub token, automatically provided to the action | ||
# (No need to define this secret in the repo settings) | ||
github_token: ${{ secrets.github_token }} | ||
build_script_name: 'electron:prebuild' | ||
# If the commit is tagged with a version (e.g. "v1.0.0"), | ||
# release the app after building | ||
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
|
||
- run: npm ci | ||
- run: npm run electron:build:mac | ||
shell: bash | ||
|
||
- name: Upload binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: music-you-macos | ||
path: release/*/music-you-mac-*-universal.dmg | ||
if-no-files-found: ignore | ||
|
||
windows_build: | ||
runs-on: windows-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@master | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: '16.x' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npm run electron:build:win | ||
shell: bash | ||
|
||
- name: Upload binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: music-you-windows | ||
path: release/*/*Setup*.exe | ||
if-no-files-found: ignore | ||
if-no-files-found: ignore | ||
|
||
linux_build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: '16.x' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npm run electron:build:linux | ||
shell: bash | ||
|
||
- name: Upload binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: music-you-linux | ||
path: | | ||
music-you-*.AppImage | ||
music-you-*.tar.gz | ||
if-no-files-found: ignore | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: release job | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
workflow_dispatch: | ||
|
||
jobs: | ||
mac_release: | ||
runs-on: macos-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: '16.x' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npm run electron:build:mac | ||
shell: bash | ||
|
||
- name: Upload binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: release/*/*.* | ||
if-no-files-found: ignore | ||
- name: Create a release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
draft: true | ||
files: release/*/*.* | ||
|
||
windows_release: | ||
runs-on: windows-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: '16.x' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npm run electron:build:win | ||
shell: bash | ||
|
||
- name: Upload binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: release/*/*.* | ||
if-no-files-found: ignore | ||
|
||
- name: Create a release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
draft: true | ||
files: release/*/*.* | ||
|
||
linux_release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: '16.x' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npm run electron:build:linux | ||
shell: bash | ||
|
||
- name: Upload binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: release/*/*.* | ||
if-no-files-found: ignore | ||
|
||
- name: Create a release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
draft: true | ||
files: release/*/*.* | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters