fix: use PlayerAPI for Player.data
#2413
Workflow file for this run
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
name: Build | |
on: [pull_request, push] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Build | |
run: go build . | |
- name: Format | |
run: | | |
gofmt -s -l . | |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi | |
release: | |
name: Release | |
strategy: | |
matrix: | |
os: ["linux", "darwin", "windows"] | |
arch: ["amd64", "arm64", "386"] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get Tag | |
run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | |
- name: Is Unix Platform | |
run: echo "IS_UNIX=${{ matrix.os != 'windows' && matrix.arch != '386' }}" >> $GITHUB_ENV | |
- name: Is Windows Platform | |
run: echo "IS_WIN=${{ matrix.os == 'windows' && matrix.arch != 'arm64' }}" >> $GITHUB_ENV | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- 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 }} | |
- 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' || '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@v1 | |
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 | |
steps: | |
- name: Update AUR package | |
uses: fjogeleit/http-request-action@master | |
with: | |
url: http://vps.itsmeow.dev:8079/ | |
method: GET | |
- name: Update Homebrew tap | |
uses: mislav/bump-homebrew-formula-action@v2 | |
if: "!contains(github.ref_name, '-')" | |
with: | |
formula-name: spicetify-cli | |
formula-path: spicetify-cli.rb | |
homebrew-tap: spicetify/homebrew-tap | |
tag-name: ${{ github.ref_name }} | |
base-branch: main | |
download-url: https://github.com/spicetify/spicetify-cli/archive/${{ github.ref_name }}.tar.gz | |
commit-message: | | |
chore: {{version}} release | |
env: | |
COMMITTER_TOKEN: ${{ secrets.SPICETIFY_GITHUB_TOKEN }} | |
- name: Update Winget package | |
uses: vedantmgoyal2009/winget-releaser@v2 | |
with: | |
identifier: Spicetify.Spicetify | |
installers-regex: '-windows-\w+\.zip$' | |
token: ${{ secrets.SPICETIFY_WINGET_TOKEN }} |