new-jellyfin-web-release #41
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: Release trigger | |
on: | |
repository_dispatch: | |
types: [new-jellyfin-web-release] | |
workflow_dispatch: | |
jobs: | |
jellyfin-web_release_trigger: | |
runs-on: ubuntu-latest | |
steps: | |
- run: env | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get next version | |
uses: reecetech/[email protected] | |
id: version | |
with: | |
scheme: semver | |
increment: patch | |
- name: Clone jellyfin-tizen | |
uses: sudosubin/[email protected] | |
with: | |
repository: 'jellyfin/jellyfin-tizen' | |
platform: 'github' | |
path: 'jellyfin-tizen' | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: '>=14' | |
- name: Modify jellyfin-tizen/package.json | |
id: info | |
uses: jaywcjlove/github-action-package@main | |
with: | |
path: 'jellyfin-tizen/package.json' | |
data: | | |
{ | |
"name": "@glenlowland/jellyfin-tizen", | |
"packageType": "app", | |
"appName": "Jellyfin", | |
"appPath": "index.html", | |
"version": "${{ steps.version.outputs.version }}", | |
"keys": [ | |
"MediaPlayPause", "MediaPlay", "MediaPause", "MediaStop", | |
"MediaTrackPrevious", "MediaTrackNext", "MediaRewind", "MediaFastForward" | |
] | |
} | |
- name: Set tize-adapter.js app version | |
uses: htsnvhoang/find-replace-multiple@master | |
with: | |
finds: | | |
version: 'DEVELOPMENT' | |
replaces: | | |
version: '${{ steps.info.outputs.version }}' | |
include: "tizen-adapter.js" | |
separator: "___" | |
- name: Enable TrueHD Audio | |
uses: htsnvhoang/find-replace-multiple@master | |
with: | |
finds: | | |
return profileBuilder({ enableMkvProgressive: false, enableSsaRender: true }); | |
replaces: | | |
return profileBuilder({ enableMkvProgressive: false, enableSsaRender: true, supportsTrueHd: true }); | |
include: "jellyfin-tizen/tizen.js" | |
separator: "___" | |
- name: Include tizen-adapter.js in the app | |
uses: htsnvhoang/find-replace-multiple@master | |
with: | |
finds: | | |
webapis.setAttribute('src', '$WEBAPIS/webapis/webapis.js'); | |
replaces: | | |
webapis.setAttribute('src', '../tizen-adapter.js'); | |
include: "jellyfin-tizen/gulpfile.babel.js" | |
separator: "___" | |
- name: Inject skip-intro-button.js in the app | |
uses: htsnvhoang/find-replace-multiple@master | |
with: | |
finds: | | |
injectTarget.insertBefore(tizen, apploader); | |
replaces: | | |
injectTarget.insertBefore(tizen, apploader); | |
// inject skip-intro-button.js | |
const skipIntro = this.createElement('script'); | |
skipIntro.setAttribute('src', 'https://cdn.jsdelivr.net/gh/jumoog/intro-skipper/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js'); | |
skipIntro.setAttribute('defer', ''); | |
injectTarget.insertBefore(skipIntro, apploader); | |
include: "jellyfin-tizen/gulpfile.babel.js" | |
separator: "___" | |
- name: Build jellyfin-tizen | |
run: | | |
cp tizen-adapter.js jellyfin-tizen/ | |
cd jellyfin-tizen | |
rm .gitignore | |
npm install @glenlowland/jellyfin-web | |
JELLYFIN_WEB_DIR=./node_modules/@glenlowland/jellyfin-web/dist npm ci --no-audit | |
- name: Publish new @glenlowland/jellyfin-tizen package version | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
package: jellyfin-tizen | |
access: public | |
- name: Release Build Result | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.info.outputs.version }} | |
body: "A new version of @glenlowland/jellyfin-tizen has been published because of a new release of @glenlowland/jellyfin-web." | |