Skip to content

Commit

Permalink
Merge pull request #11 from JoCat/master
Browse files Browse the repository at this point in the history
Updating dependencies and adding autobuild using Actions
  • Loading branch information
Vic Shóstak authored Jun 1, 2023
2 parents 24e6403 + 183b9ff commit 7f97ccc
Show file tree
Hide file tree
Showing 8 changed files with 37,244 additions and 5 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
build-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Setup Node.js environment
uses: actions/setup-node@v3.6.0

- name: Installing dependencies
run: npm install -g appdmg

- name: Build
run: make build-macos installer-macos

- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
draft: true
files: releases/macOS/yamusic_desktop-macosx-amd64.dmg

build-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Build
shell: cmd
run: |
mkdir build\Windows
set CGO_CXXFLAGS="-I%cd%\libs\webview2"
go build -ldflags="-H windowsgui" -o "build\Windows\Yandex.Music Desktop.exe"
copy /Y libs\webview2\WebView2Loader.dll build\Windows
- name: Pack release
uses: vimtor/action-zip@v1
with:
files: build\Windows
dest: releases/Windows/yamusic_desktop-windows-10-amd64.zip

- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
draft: true
files: releases/Windows/yamusic_desktop-windows-10-amd64.zip

build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Installing dependencies
run: sudo apt install libgtk-3-dev libwebkit2gtk-4.0-dev

- name: Build
run: make build-linux archive-tar-linux

- name: Rename file
run: mv ./releases/Linux/yamusic_desktop.tar.gz ./releases/Linux/yamusic_desktop-linux-amd64.tar.gz

- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
draft: true
files: releases/Linux/yamusic_desktop-linux-amd64.tar.gz
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ build-windows:
&& mkdir -p ./build/Windows/ \
&& xgo -out ./build/Windows/yamusic_desktop -ldflags="-H windowsgui" --targets=windows-10/amd64 \
github.com/koddr/yandex-music-desktop \
&& mv ./build/Windows/yamusic_desktop-windows-10-amd64.exe ./build/Windows/Yandex.Music\ Desktop.exe
&& mv ./build/Windows/yamusic_desktop-windows-10-amd64.exe ./build/Windows/Yandex.Music\ Desktop.exe \
&& cp ./libs/webview2/WebView2Loader.dll ./build/Windows
@echo "[OK] Build for MS Windows 10 x64 complete!"

installers: installer-macos archive-tar-linux archive-zip-windows
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/koddr/yandex-music-desktop

go 1.11

require github.com/zserge/webview v0.0.0-20200516134046-4caf698fad53
require github.com/webview/webview v0.0.0-20230110200822-73aee3dae745
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/zserge/webview v0.0.0-20200516134046-4caf698fad53 h1:7qvr23qx/4M/y1/04h1XwQI+T+xZep+K+XuP3vBw3aE=
github.com/zserge/webview v0.0.0-20200516134046-4caf698fad53/go.mod h1:qxc/5N3SOFrs3q+EAVHqaJ1oLbm+hHlDhfhRYg8x7wQ=
github.com/webview/webview v0.0.0-20230110200822-73aee3dae745 h1:yq3jph00Ulex/MG1lgDpGceukf7dT06qi9YAB45Z7v0=
github.com/webview/webview v0.0.0-20230110200822-73aee3dae745/go.mod h1:rpXAuuHgyEJb6kXcXldlkOjU6y4x+YcASKKXJNUhh0Y=
1 change: 1 addition & 0 deletions libs/webview2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!*.dll
Loading

0 comments on commit 7f97ccc

Please sign in to comment.