Rename to spotify-quickauth

This commit is contained in:
2024-10-03 20:12:54 -05:00
parent 9959787ff3
commit 0e96772077
8 changed files with 38 additions and 22 deletions

View File

@@ -118,36 +118,36 @@ jobs:
uses: TheDoctor0/zip-release@0.7.6 uses: TheDoctor0/zip-release@0.7.6
with: with:
type: tar type: tar
filename: spotify-player-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.tar.gz filename: spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.tar.gz
directory: target/${{ matrix.target }}/release/ directory: target/${{ matrix.target }}/release/
path: | path: |
spotify-player-quickauth spotify-quickauth
- name: Archive - name: Archive
if: ${{ contains(matrix.os, 'windows') }} if: ${{ contains(matrix.os, 'windows') }}
uses: TheDoctor0/zip-release@0.7.6 uses: TheDoctor0/zip-release@0.7.6
with: with:
type: zip type: zip
filename: spotify-player-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.zip filename: spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.zip
directory: target/${{ matrix.target }}/release/ directory: target/${{ matrix.target }}/release/
path: | path: |
spotify-player-quickauth.exe spotify-quickauth.exe
- name: Upload Artifact - name: Upload Artifact
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: spotify-player-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }} name: spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}
if-no-files-found: error if-no-files-found: error
retention-days: 7 retention-days: 7
path: target/${{ matrix.target }}/release/spotify-player-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.* path: target/${{ matrix.target }}/release/spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.*
- name: Release - name: Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
with: with:
files: | files: |
target/${{ matrix.target }}/release/spotify-player-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.* target/${{ matrix.target }}/release/spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.*
generate_release_notes: true generate_release_notes: true
# Publish flow # Publish flow

View File

@@ -21,7 +21,7 @@ jobs:
steps: steps:
- name: Run Integration - name: Run Integration
run: iex (irm "https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.ps1") run: iex (irm "https://raw.githubusercontent.com/Xevion/spotify-quickauth/refs/heads/master/run.ps1")
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -36,6 +36,6 @@ jobs:
steps: steps:
- name: Run Integration - name: Run Integration
run: curl -sSL https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.sh | sh run: curl -sSL https://raw.githubusercontent.com/Xevion/spotify-quickauth/refs/heads/master/run.sh | sh
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
Cargo.lock generated
View File

@@ -2272,7 +2272,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "spotify-player-quickauth" name = "spotify-quickauth"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"env_logger", "env_logger",

View File

@@ -1,5 +1,5 @@
[package] [package]
name = "spotify-player-quickauth" name = "spotify-quickauth"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

16
INTEGRATION.md Normal file
View File

@@ -0,0 +1,16 @@
# integration
A small document explaining how to test this project on any given system.
1. Install `spotify-player` using one of these steps
- Package Managers
- MacOS: `brew install spotify_player`
- Windows (scoop): `scoop install spotify-player`
- Linux
- Ubuntu/Debian: `sudo apt install libssl-dev libasound2-dev libdbus-1-dev`
- Homebrew: `brew install openssl alsa-lib dbus`
- AUR: `yay -S spotify-player`
- Void Linux:
- FreeBSD:
- NetBSD:
- Build from Source: `cargo install spotify_player --locked`

View File

@@ -1,4 +1,4 @@
# spotify-player-quickauth # spotify-quickauth
A simple CLI-based application for creating a `credentials.json` file, used by the [spotify-player][spotify-player] library, for authenticating with the Spotify API. A simple CLI-based application for creating a `credentials.json` file, used by the [spotify-player][spotify-player] library, for authenticating with the Spotify API.
@@ -9,13 +9,13 @@ You can install this application, but most people will just need it once. The fo
For Linux and macOS, you can paste this command into your terminal: For Linux and macOS, you can paste this command into your terminal:
```bash ```bash
curl -sSL https://xevion.github.io/spotify-player-quickauth/run.sh | sh curl -sSL https://xevion.github.io/spotify-quickauth/run.sh | sh
``` ```
For Windows, you can paste this command into PowerShell: For Windows, you can paste this command into PowerShell:
```powershell ```powershell
iex (irm "https://xevion.github.io/spotify-player-quickauth/run.ps1") iex (irm "https://xevion.github.io/spotify-quickauth/run.ps1")
``` ```
## Building from Source ## Building from Source
@@ -26,10 +26,10 @@ Don't want to run my funky shell script? No problem! You can build the applicati
- This is an early project, so the minimum supported version of Rust is not known. I'm developing on 1.81.0 though. - This is an early project, so the minimum supported version of Rust is not known. I'm developing on 1.81.0 though.
```bash ```bash
git clone https://github.com/Xevion/spotify-player-quickauth.git git clone https://github.com/Xevion/spotify-quickauth.git
cd spotify-player-quickauth cd spotify-quickauth
cargo build --release cargo build --release
./target/release/spotify-player-quickauth ./target/release/spotify-quickauth
``` ```
[spotify-player]: https://github.com/aome510/spotify-player [spotify-player]: https://github.com/aome510/spotify-player

View File

@@ -25,7 +25,7 @@ if ($platform -ne "win32") {
$target = "x86_64-pc-windows-msvc" $target = "x86_64-pc-windows-msvc"
$REPO = "Xevion/spotify-player-quickauth" $REPO = "Xevion/spotify-quickauth"
$API_URL = "https://api.github.com/repos/$REPO/releases/latest" $API_URL = "https://api.github.com/repos/$REPO/releases/latest"
try { try {
@@ -47,8 +47,8 @@ if (-not $DOWNLOAD_URL) {
exit 1 exit 1
} }
$EXECUTABLE_ZIP = Join-Path (Get-Location) "spotify-player-quickauth.zip" $EXECUTABLE_ZIP = Join-Path (Get-Location) "spotify-quickauth.zip"
$EXECUTABLE = "spotify-player-quickauth.exe" $EXECUTABLE = "spotify-quickauth.exe"
Invoke-RestMethod -Uri $DOWNLOAD_URL -OutFile $EXECUTABLE_ZIP Invoke-RestMethod -Uri $DOWNLOAD_URL -OutFile $EXECUTABLE_ZIP

4
run.sh
View File

@@ -15,7 +15,7 @@ else
fi fi
# Fetch the latest release download URL # Fetch the latest release download URL
REPO="Xevion/spotify-player-quickauth" REPO="Xevion/spotify-quickauth"
API_URL="https://api.github.com/repos/$REPO/releases/latest" API_URL="https://api.github.com/repos/$REPO/releases/latest"
if [ -n "$GH_TOKEN" ]; then if [ -n "$GH_TOKEN" ]; then
API_URL="$API_URL -H 'Authorization: Bearer $GH_TOKEN'" API_URL="$API_URL -H 'Authorization: Bearer $GH_TOKEN'"
@@ -27,7 +27,7 @@ if [ -z "$DOWNLOAD_URL" ]; then
exit 1 exit 1
fi fi
EXECUTABLE="spotify-player-quickauth" EXECUTABLE="spotify-quickauth"
curl -Lso $EXECUTABLE.tar.gz $DOWNLOAD_URL curl -Lso $EXECUTABLE.tar.gz $DOWNLOAD_URL
tar -xvf $EXECUTABLE.tar.gz $EXECUTABLE tar -xvf $EXECUTABLE.tar.gz $EXECUTABLE
rm $EXECUTABLE.tar.gz rm $EXECUTABLE.tar.gz