Skip to content

fix(ambient-mode): fix ambient-mode not working for videos after rest… #17

fix(ambient-mode): fix ambient-mode not working for videos after rest…

fix(ambient-mode): fix ambient-mode not working for videos after rest… #17

Workflow file for this run

name: Build YouTube Music
on:
push:
branches: [ music-query-widget ]
pull_request:
env:
NODE_VERSION: "20.x"
jobs:
build:
name: Build YouTube Music
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- name: Setup NodeJS
if: startsWith(matrix.os, 'macOS') != true
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Setup NodeJS for macOS
if: startsWith(matrix.os, 'macOS')
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Only vite build without release if it is a fork, or it is a pull-request
- name: Vite Build
if: github.repository == 'iryis/th-ch-ytmusic' && github.event_name == 'pull_request'
run: |
pnpm build
# Build and release if it's the main repository and is not pull-request
- name: Build and release on Mac
if: startsWith(matrix.os, 'macOS') && (github.repository == 'iryis/th-ch-ytmusic' && github.event_name != 'pull_request')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm release:mac
- name: Build and release on Linux
if: startsWith(matrix.os, 'ubuntu') && (github.repository == 'iryis/th-ch-ytmusic' && github.event_name != 'pull_request')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo snap install snapcraft --classic
pnpm release:linux
- name: Build and release on Windows
if: startsWith(matrix.os, 'windows') && (github.repository == 'iryis/th-ch-ytmusic' && github.event_name != 'pull_request')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm release:win
- name: Test
uses: coactions/setup-xvfb@v1
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
with:
run: pnpm test:debug
release:
runs-on: ubuntu-latest
name: Release YouTube Music
if: github.repository == 'iryis/th-ch-ytmusic' && github.ref == 'refs/heads/music-query-widget'
needs: build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- name: Setup NodeJS
if: startsWith(matrix.os, 'macOS') != true
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Setup NodeJS for macOS
if: startsWith(matrix.os, 'macOS')
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Get version
run: |
echo "VERSION_TAG=v$(node -pe "require('./package.json').version")" >> $GITHUB_ENV
- name: Check if version already exists in tags
run: |
echo "VERSION_HASH=$(git rev-parse -q --verify 'refs/tags/${{ env.VERSION_TAG }}')" >> $GITHUB_ENV
echo "CHANGELOG_ANCHOR=$(echo $VERSION_TAG | sed -e 's/\.//g')" >> $GITHUB_ENV
- name: Fetch draft release
if: ${{ env.VERSION_HASH == '' }}
uses: cardinalby/git-get-release-action@v1
id: get_draft_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
latest: true
draft: true
searchLimit: 1
- name: Publish Release (if it does not exist)
if: ${{ env.VERSION_HASH == '' }}
uses: irongut/[email protected]
with:
token: ${{ secrets.GH_TOKEN }}
id: ${{ steps.get_draft_release.outputs.id }}
draft: false
prerelease: false
replacename: true
name: ${{ env.VERSION_TAG }}+mw
replacebody: true
body: |
See [changelog](https://github.com/th-ch/youtube-music/blob/master/changelog.md#${{ env.CHANGELOG_ANCHOR }}) for the list of updates and the full diff.
Includes `music-query-widget` plugin. (supports e.g. amuse, ytmdv1)
(Note for Windows: `YouTube-Music-Web-Setup-${{ env.VERSION_TAG }}.exe` is an installer, and `YouTube-Music-${{ env.VERSION_TAG }}.exe` is a portable version)
## Amuse Tutorial
- Download below the release according to your platform (you may have to press Show more releases)
- On MacOS You may find it easier to use the other dmg file if you get a "damaged" popup (We love Apple)
- Open it up and find Plugins in the top left to enable **Music Widget API**
- Continue with regular Amuse OBS setup