Compare commits

...

2 commits

2 changed files with 124 additions and 1 deletions

View file

@ -82,4 +82,10 @@ Enable this playlist, currently ignored.
## Installation ## Installation
Download the `.dll` in the [releases](/redxef/jellyfin-smart-playlist/releases) section and place it in the `plugins/jellyfin-smart-playlist/` directory (create it). Add the [plugin repository](https://jellyfin.org/docs/general/server/plugins/#catalog)
to Jellyfin:
`https://gitea.redxef.at/redxef/jellyfin-smart-playlist/raw/branch/manifest/manifest.json`
Go to `Dashboard>Catalog>(Gear)>(Plus)` and paste the provided link into
the field labeled `Repository URL`, give the plugin a descriptive name
too.

117
ci/pipeline.yml Normal file
View file

@ -0,0 +1,117 @@
---
resource_types:
- name: http-resource
type: registry-image
source:
repository: redxef/concourse-http-resource
tag: edge
resources:
- name: source
type: git
source:
uri: https://gitea.redxef.at/redxef/jellyfin-smart-playlist
branch: main
fetch_tags: true
tag_regex: 'v.*'
- name: manifest
type: git
source:
uri: ssh://git@gitea.redxef.at:8022/redxef/jellyfin-smart-playlist.git
branch: manifest
private_key: ((gitea.id_ed25519))
- name: releases
type: http-resource
source:
url: https://gitea.redxef.at/api/v1/repos/redxef/jellyfin-smart-playlist/releases
method: get
auth:
basic:
username: ((gitea.username))
password: ((gitea.token))
- name: artifact
type: http-resource
source:
url: https://gitea.redxef.at/api/v1/repos/redxef/jellyfin-smart-playlist/releases/((.:release_id))/assets
method: get
auth:
basic:
username: ((gitea.username))
password: ((gitea.token))
headers:
- - Accept
- application/json
query:
- - name
- smart-playlist_((.:version)).zip
body:
multipart:
files:
attachment: artifacts/smart-playlist_((.:version)).zip
version_check_method: none
jobs:
- name: release
plan:
- get: source
trigger: true
- get: manifest
- get: releases
- task: run-build
config:
platform: linux
image_resource:
type: registry-image
source:
repository: alpine
inputs:
- name: source
- name: manifest
- name: releases
outputs:
- name: artifacts
- name: manifest
run:
path: sh
args:
- -c
- |
#!/bin/sh
set -eu
apk add --no-cache jq git dotnet8-sdk python3 py3-pip
pip3 install --break-system-packages jprm
cp manifest/manifest.json source/
(
cd source
./release.sh build
)
cp source/artifacts/*.zip artifacts/
cd source
VERSION="$(./release.sh version)"
cd ..
printf '%s' "$VERSION" > artifacts/version
cp source/manifest.json manifest/
(
cd manifest
git add .
git config user.name 'Concourse CI/CD'
git config user.email 'concourse@redxef.at'
git commit -m "ci: update manifest for version ${VERSION}."
)
jq --arg tag "v$VERSION" -r '.[] | select(.tag_name == $tag) | .id' < releases/body > artifacts/release_id
ls artifacts
- load_var: release_id
file: artifacts/release_id
reveal: true
- load_var: version
file: artifacts/version
reveal: true
- put: artifact
inputs:
- artifacts
params:
method: post
- put: manifest
params:
repository: manifest