mirror of
https://github.com/jellyfin/jellyfin-artwork.git
synced 2024-11-27 00:00:39 +00:00
Add CI/CD
This commit is contained in:
parent
6a8ce2655d
commit
a9b6e0218a
42
.github/workflows/build_and_release.yml
vendored
Normal file
42
.github/workflows/build_and_release.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: Build & release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14"
|
||||
- name: Install build dependencies
|
||||
run: npm install svgo
|
||||
- name: Create dist directory
|
||||
run: mkdir dist
|
||||
- name: Copy source SVGs
|
||||
run: cp -r studios dist/
|
||||
- name: Optimize source SVGs
|
||||
run: npx svgo --multipass dist/studios/**/*.svg
|
||||
- name: ImageMagick Action
|
||||
uses: jruipinto/ImageMagick-action@v1
|
||||
with:
|
||||
# ImageMagick command to be executed
|
||||
command: mogrify -format webp dist/studios/**/*.svg
|
||||
- name: Build studios.json
|
||||
run: jq -s '.[0]=([.[]]|flatten)|.[0]' studios/**/studio.json > dist/studios.json
|
||||
- name: Remove individual JSON files
|
||||
run: rm dist/studios/**/studio.json
|
||||
- name: Compress built assets
|
||||
run: cd dist; zip -r -D ../release.zip *; cd ..
|
||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "latest"
|
||||
prerelease: false
|
||||
files: |
|
||||
release.zip
|
2
.github/workflows/validate_json.yml
vendored
2
.github/workflows/validate_json.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Validate studios JSON file
|
||||
name: Validate JSON files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
38
studios.json
38
studios.json
@ -1,38 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "E!",
|
||||
"providers": {
|
||||
"tvdb": "87",
|
||||
"tmdb": "76",
|
||||
"imdb": "co0022548"
|
||||
},
|
||||
"artwork": {
|
||||
"primary": "e",
|
||||
"thumb": "e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Game Show Network",
|
||||
"providers": {
|
||||
"tvdb": "116",
|
||||
"tmdb": "63"
|
||||
},
|
||||
"artwork": {
|
||||
"primary": "game-show-network",
|
||||
"thumb": "game-show-network"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Netflix",
|
||||
"providers": {
|
||||
"tvdb": "535",
|
||||
"tmdb": "213",
|
||||
"imdb": "co0144901",
|
||||
"anidb": "54015"
|
||||
},
|
||||
"artwork": {
|
||||
"primary": "netflix",
|
||||
"thumb": "netflix"
|
||||
}
|
||||
}
|
||||
]
|
15
studios/e/studio.json
Normal file
15
studios/e/studio.json
Normal file
@ -0,0 +1,15 @@
|
||||
[
|
||||
{
|
||||
"name": "E!",
|
||||
"machine-name": "e",
|
||||
"providers": {
|
||||
"tvdb": "87",
|
||||
"tmdb": "76",
|
||||
"imdb": "co0022548"
|
||||
},
|
||||
"artwork": {
|
||||
"primary": ["svg", "webp"],
|
||||
"thumb": ["svg", "webp"]
|
||||
}
|
||||
}
|
||||
]
|
14
studios/game-show-network/studio.json
Normal file
14
studios/game-show-network/studio.json
Normal file
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"name": "Game Show Network",
|
||||
"machine-name": "game-show-network",
|
||||
"providers": {
|
||||
"tvdb": "116",
|
||||
"tmdb": "63"
|
||||
},
|
||||
"artwork": {
|
||||
"primary": ["svg", "webp"],
|
||||
"thumb": ["svg", "webp"]
|
||||
}
|
||||
}
|
||||
]
|
16
studios/netflix/studio.json
Normal file
16
studios/netflix/studio.json
Normal file
@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"name": "Netflix",
|
||||
"machine-name": "netflix",
|
||||
"providers": {
|
||||
"tvdb": "535",
|
||||
"tmdb": "213",
|
||||
"imdb": "co0144901",
|
||||
"anidb": "54015"
|
||||
},
|
||||
"artwork": {
|
||||
"primary": ["svg", "webp"],
|
||||
"thumb": ["svg", "webp"]
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue
Block a user