feat(lyrics-plus): implement pinyin romanization for Chinese lyrics #4777
This file contains hidden or 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
| name: Build | |
| on: | |
| pull_request: | |
| branches: | |
| - "main" | |
| - "*/main/*/**" | |
| push: | |
| branches: | |
| - "main" | |
| - "*/main/*/**" | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| - name: Install Node dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Validate wrapper build | |
| run: pnpm check:wrapper | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Build | |
| run: go build . | |
| - name: Format | |
| run: | | |
| gofmt -s -l . | |
| if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi | |
| release: | |
| permissions: | |
| id-token: write | |
| contents: write | |
| attestations: write | |
| name: Release | |
| strategy: | |
| matrix: | |
| os: ["linux", "darwin", "windows"] | |
| arch: ["amd64", "arm64", "386"] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v2') | |
| needs: build | |
| env: | |
| SIGNPATH_ENABLED: ${{ secrets.SIGNPATH_API_TOKEN != '' && secrets.SIGNPATH_ORG_ID != '' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Get Tag | |
| run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| - name: Install Node dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build wrapper bundle | |
| run: pnpm build:wrapper | |
| - name: Is Unix Platform | |
| run: echo "IS_UNIX=${{ matrix.os != 'windows' && matrix.arch != '386' && (matrix.os != 'linux' || matrix.arch != 'arm64') }}" >> $GITHUB_ENV | |
| - name: Is Windows Platform | |
| run: echo "IS_WIN=${{ matrix.os == 'windows' }}" >> $GITHUB_ENV | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Build | |
| if: env.IS_UNIX == 'true' || env.IS_WIN == 'true' | |
| run: | | |
| go build -ldflags "-X main.version=${{ env.TAG }}" -o "./spicetify${{ matrix.os == 'windows' && '.exe' || '' }}" | |
| chmod +x "./spicetify${{ matrix.os == 'windows' && '.exe' || '' }}" | |
| env: | |
| GOOS: ${{ matrix.os }} | |
| GOARCH: ${{ matrix.arch }} | |
| CGO_ENABLED: 0 | |
| - name: Upload Artifact for Signing | |
| if: env.IS_WIN == 'true' && env.SIGNPATH_ENABLED == 'true' | |
| id: upload-artifact-for-signing | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ (matrix.arch == 'amd64' && 'x64') || (matrix.arch == 'arm64' && 'arm64') || 'x32' }}-unsigned | |
| path: ./spicetify.exe | |
| - name: Sign Windows Executable | |
| if: env.IS_WIN == 'true' && env.SIGNPATH_ENABLED == 'true' | |
| uses: signpath/github-action-submit-signing-request@v2 | |
| with: | |
| api-token: ${{ secrets.SIGNPATH_API_TOKEN }} | |
| organization-id: ${{ secrets.SIGNPATH_ORG_ID }} | |
| project-slug: "cli" | |
| signing-policy-slug: "release-signing" | |
| github-artifact-id: ${{ steps.upload-artifact-for-signing.outputs.artifact-id }} | |
| wait-for-completion: true | |
| output-artifact-directory: "./signed" | |
| - name: Copy Signed Windows Executable | |
| if: env.IS_WIN == 'true' && env.SIGNPATH_ENABLED == 'true' | |
| run: | | |
| cp ./signed/spicetify.exe ./spicetify.exe | |
| - name: Attest output | |
| uses: actions/attest-build-provenance@v4 | |
| if: env.IS_UNIX == 'true' || env.IS_WIN == 'true' | |
| with: | |
| subject-path: "./spicetify${{ matrix.os == 'windows' && '.exe' || '' }}" | |
| subject-name: "spicetify v${{ env.TAG }} (${{ matrix.os }}, ${{ (matrix.os == 'windows' && matrix.arch == 'amd64' && 'x64') || (matrix.os == 'windows' && matrix.arch == '386' && 'x32') || matrix.arch }})" | |
| - name: 7z - .tar | |
| if: env.IS_UNIX == 'true' | |
| uses: edgarrc/action-7z@v1 | |
| with: | |
| args: 7z a -bb0 "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar" "./spicetify" "./CustomApps" "./Extensions" "./Themes" "./jsHelper" "globals.d.ts" "css-map.json" | |
| - name: 7z - .tar.gz | |
| if: env.IS_UNIX == 'true' | |
| uses: edgarrc/action-7z@v1 | |
| with: | |
| args: 7z a -bb0 -sdel -mx9 "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz" "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar" | |
| - name: 7z - .zip | |
| if: env.IS_WIN == 'true' | |
| uses: edgarrc/action-7z@v1 | |
| with: | |
| args: 7z a -bb0 -mx9 "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ (matrix.arch == 'amd64' && 'x64') || (matrix.arch == 'arm64' && 'arm64') || 'x32' }}.zip" "./spicetify.exe" "./CustomApps" "./Extensions" "./Themes" "./jsHelper" "globals.d.ts" "css-map.json" | |
| - name: Release | |
| if: env.IS_UNIX == 'true' || env.IS_WIN == 'true' | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ (matrix.os == 'windows' && matrix.arch == 'amd64' && 'x64') || (matrix.os == 'windows' && matrix.arch == '386' && 'x32') || matrix.arch }}.${{ matrix.os == 'windows' && 'zip' || 'tar.gz' }}" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| trigger-release: | |
| name: Trigger Homebrew/AUR Release | |
| runs-on: ubuntu-latest | |
| needs: release | |
| if: github.event.release.prerelease == false | |
| steps: | |
| - name: Update AUR package | |
| uses: fjogeleit/http-request-action@master | |
| with: | |
| url: https://spicetify-update.itsmeow.dev/spicetify-update | |
| method: GET | |
| - name: Update Winget package | |
| uses: vedantmgoyal9/winget-releaser@main | |
| with: | |
| identifier: Spicetify.Spicetify | |
| installers-regex: '-windows-\w+\.zip$' | |
| token: ${{ secrets.SPICETIFY_WINGET_TOKEN }} |