Skip to content

Commit 2c52e2c

Browse files
committed
Added AUR Package
1 parent b4470be commit 2c52e2c

File tree

5 files changed

+65
-0
lines changed

5 files changed

+65
-0
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,28 @@ jobs:
7878
sp0-win-x64.exe
7979
env:
8080
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
deploy-aur:
82+
needs: [build]
83+
if: startsWith(github.ref, 'refs/tags/')
84+
runs-on: ubuntu-latest
85+
steps:
86+
- uses: actions/checkout@v2
87+
- name: Download Artifacts
88+
uses: actions/download-artifact@master
89+
- name: Rename binaries
90+
run: |
91+
cp sp0-ubuntu-latest/sp0 sp0-linux-x64
92+
- name: Generate AUR Package
93+
run: |
94+
export TEMPLATE_PKGVER="${GITHUB_REF##*/}"
95+
export TEMPLATE_PKGSUM="$(sha256sum sp0-linux-x64 | cut -d ' ' -f 1)"
96+
cat deploy/aur/PKGBUILD.template | envsubst '${TEMPLATE_PKGVER} ${TEMPLATE_PKGSUM}' > PKGBUILD
97+
- name: Publish AUR Package
98+
uses: KSXGitHub/github-actions-deploy-aur@v2.0.2
99+
with:
100+
pkgname: sp0-bin
101+
pkgbuild: PKGBUILD
102+
commit_username: ${{ secrets.AUR_USERNAME }}
103+
commit_email: ${{ secrets.AUR_EMAIL }}
104+
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
105+
commit_message: "Update AUR Package"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,4 @@ MigrationBackup/
358358
.ionide/
359359

360360
# End of https://www.toptal.com/developers/gitignore/api/csharp
361+
sp0_aur/

LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2020 Jonas Dellinger
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

deploy/aur/PKGBUILD

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Maintainer: Jonas Dellinger <jonas@dellinger.dev>
2+
# Maintainer: SP0 Deploy <sp0-deploy@dellinger.dev>
3+
pkgname="sp0-bin"
4+
pkgver=0.1.0
5+
pkgrel=1
6+
pkgdesc='A cross-platform CLI Tool for requesting the Spotify Web API, with a focus on automation. '
7+
arch=('x86_64')
8+
url='https://github.com/JohnnyCrazy/Sp0'
9+
license=('MIT')
10+
provides=("sp0")
11+
source=("${pkgname}-${pkgver}::https://github.com/JohnnyCrazy/sp0/releases/download/$pkgver/sp0-linux-x64")
12+
sha256sums=('66e401380fe68d3c677a31cb2a2f0b80e282f0e367c42646f4ce10ea8ec6388d')
13+
14+
package() {
15+
install -Dm 0755 ${pkgname}-${pkgver} "$pkgdir/usr/bin/sp0"
16+
}

deploy/aur/PKGBUILD.template

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Maintainer: Jonas Dellinger <jonas@dellinger.dev>
2+
# Maintainer: SP0 Deploy <sp0-deploy@dellinger.dev>
3+
pkgname="sp0-bin"
4+
pkgver=${TEMPLATE_PKGVER}
5+
pkgrel=1
6+
pkgdesc='A cross-platform CLI Tool for requesting the Spotify Web API, with a focus on automation. '
7+
arch=('x86_64')
8+
url='https://github.com/JohnnyCrazy/Sp0'
9+
license=('MIT')
10+
provides=("sp0")
11+
source=("${pkgname}-${pkgver}::https://github.com/JohnnyCrazy/sp0/releases/download/$pkgver/sp0-linux-x64")
12+
sha256sums=('${TEMPLATE_PKGSUM}')
13+
14+
package() {
15+
install -Dm 0755 ${pkgname}-${pkgver} "$pkgdir/usr/bin/sp0"
16+
}

0 commit comments

Comments
 (0)