Skip to content

Commit

Permalink
Github action for auto build on release. Cache-dir description.
Browse files Browse the repository at this point in the history
  • Loading branch information
DECE2183 committed Feb 27, 2025
1 parent 470f6f2 commit 0121526
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- 'v*'

jobs:
build:
name: Release binaries
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5

- name: Download dependencies
run: go mod vendor
- name: Pack vendor dir
run: tar -czf yamusic-tui-vendor.tar.gz ./vendor
- name: Upload vendor archive
uses: svenstaro/upload-release-action@v2
with:
file: yamusic-tui-vendor.tar.gz
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
body: "### ${{ github.ref }}"
draft: true

- name: Build linux-amd64
run: go build -trimpath -ldflags="-w -s" -o yamusic
env:
GOOS: linux
GOARCH: amd64
- name: Upload linux-amd64
uses: svenstaro/upload-release-action@v2
with:
file: yamusic
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
body: "### ${{ github.ref }}"
draft: true

- name: Build linux-amd64-nomedia
run: go build -trimpath -ldflags="-w -s" -tags=nomedia -o yamusic-nomedia
env:
GOOS: linux
GOARCH: amd64
- name: Upload linux-amd64-nomedia
uses: svenstaro/upload-release-action@v2
with:
file: yamusic-nomedia
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
body: "### ${{ github.ref }}"
draft: true

- name: Build windows-amd64
run: go build -trimpath -ldflags="-w -s" -o yamusic.exe
env:
GOOS: windows
GOARCH: amd64
- name: Upload windows-amd64
uses: svenstaro/upload-release-action@v2
with:
file: yamusic.exe
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
body: "### ${{ github.ref }}"
draft: true

- name: Build windows-amd64-nomedia
run: go build -trimpath -ldflags="-w -s" -tags=nomedia -o yamusic-nomedia.exe
env:
GOOS: windows
GOARCH: amd64
- name: Upload windows-amd64
uses: svenstaro/upload-release-action@v2
with:
file: yamusic-nomedia.exe
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
body: "### ${{ github.ref }}"
draft: true
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ rewind-duration-s: 5
volume: 0.5
volume-step: 0.05
cache-tracks: likes # none/likes/all
cache-dir: ""
search:
artists: true
albums: false
Expand Down Expand Up @@ -94,6 +95,9 @@ controls:
player-vol-donw: '-'
```
By default, all cached tracks are stored in the system cache directory. `~/.cache/yamusic-tui` on Linux and `~/AppData/Local/yamusic-tui` on Windows.
You can change this behavior by specifying a preferred cache directory in the `cache-dir` field.

You can list multiple keys for the same control, separated by commas.

Increase the `buffer-size-ms` if you have glitches or stutters.

0 comments on commit 0121526

Please sign in to comment.