Build New Release #180
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: Build New Release | |
on: | |
repository_dispatch: | |
types: [build_new_release] | |
workflow_dispatch: | |
inputs: | |
webReleaseTagName: | |
description: 'The tag name for the jellyfin-web release' | |
required: true | |
type: string | |
rawMarkdown: | |
description: 'Raw markdown for the release description' | |
required: false | |
default: '' | |
type: string | |
prerelease: | |
description: 'Set if the release should be marked as a prerelease' | |
required: false | |
default: false | |
type: boolean | |
env: | |
TIZEN_STUDIO_VER: 4.5.1 | |
TIZEN_STUDIO_URL: https://download.tizen.org/sdk/Installer/tizen-studio_$TIZEN_STUDIO_VER/web-cli_Tizen_Studio_$TIZEN_STUDIO_VER_ubuntu-64.bin | |
TIZEN_STUDIO_FILE: web-cli_Tizen_Studio_$TIZEN_STUDIO_VER_ubuntu-64.bin | |
jobs: | |
run-info: | |
name: Show run info | |
runs-on: ubuntu-latest | |
steps: | |
- name: Output Inputs | |
run: echo "${{ toJSON(github.event.inputs) }}" | |
build: | |
name: Build artifacts | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- tag: ${{ github.event.inputs.webReleaseTagName }} | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin | |
- tag: release-10.10.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.10.z | |
- tag: release-10.9.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.9.z | |
- tag: master | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-master | |
- tag: ${{ github.event.inputs.webReleaseTagName }} | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-intros | |
inject_intros: true | |
- tag: release-10.10.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.10.z-intros | |
inject_intros: true | |
- tag: release-10.9.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.9.z-intros | |
inject_intros: true | |
- tag: ${{ github.event.inputs.webReleaseTagName }} | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-TrueHD | |
true_hd: true | |
- tag: release-10.10.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.10.z-TrueHD | |
true_hd: true | |
- tag: release-10.9.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.9.z-TrueHD | |
true_hd: true | |
- tag: master | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-master-TrueHD | |
true_hd: true | |
- tag: ${{ github.event.inputs.webReleaseTagName }} | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-intros-TrueHD | |
true_hd: true | |
inject_intros: true | |
- tag: ${{ github.event.inputs.webReleaseTagName }} | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-secondary | |
secondary: true | |
- tag: ${{ github.event.inputs.webReleaseTagName }} | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-secondary-intros | |
secondary: true | |
inject_intros: true | |
- tag: release-10.10.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.10.z-secondary | |
secondary: true | |
- tag: release-10.9.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.9.z-secondary | |
secondary: true | |
- tag: release-10.10.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.10.z-secondary-intros | |
secondary: true | |
inject_intros: true | |
- tag: release-10.9.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.9.z-secondary-intros | |
secondary: true | |
inject_intros: true | |
- tag: ${{ github.event.inputs.webReleaseTagName }} | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-OblongIcon | |
oblong_icon: true | |
- tag: release-10.10.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.10.z-OblongIcon | |
oblong_icon: true | |
- tag: release-10.9.z | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-10.9.z-OblongIcon | |
oblong_icon: true | |
- tag: master | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-master-OblongIcon | |
oblong_icon: true | |
- tag: ${{ github.event.inputs.webReleaseTagName }} | |
repository: jellyfin/jellyfin-web | |
artifact_name: Jellyfin-intros-OblongIcon | |
inject_intros: true | |
oblong_icon: true | |
steps: | |
- run: env | |
- name: 'Checkout' | |
uses: actions/checkout@v1 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '>=20' | |
- name: Install Needed packages | |
run: sudo apt install expect | |
- name: Download Tizen-Studio | |
run: | | |
curl -o tizen-installer "https://download.tizen.org/sdk/Installer/tizen-studio_${TIZEN_STUDIO_VER}/web-cli_Tizen_Studio_${TIZEN_STUDIO_VER}_ubuntu-64.bin" | |
- name: Install Tizen-Studio | |
run: | | |
chmod +x tizen-installer | |
./tizen-installer --accept-license "${GITHUB_WORKSPACE}/tizen-studio" | |
rm ./tizen-installer | |
echo 'export PATH=$PATH:/tizen-studio/tools/ide/bin' >> .bashrc | |
- name: Prepare Tizen Certificate | |
run: | | |
# echo $CERTIFICATE_CONTENT > "${GITHUB_WORKSPACE}/tizencert.p12" | |
# ./tizen-studio/tools/ide/bin/tizen certificate -a Jellyfin -p 1234 -c NZ -s Aukland -ct Aukland -o Tizen -n Jellyfin -e [email protected] -f tizencert | |
./tizen-studio/tools/ide/bin/tizen security-profiles add -n Jellyfin -a "${GITHUB_WORKSPACE}/tizencert.p12" -p 1234 | |
./tizen-studio/tools/ide/bin/tizen cli-config "profiles.path=${GITHUB_WORKSPACE}/tizen-studio-data/profile/profiles.xml" | |
chmod 755 "${GITHUB_WORKSPACE}/tizen-studio-data/profile/profiles.xml" | |
env: | |
CERTIFICATE_CONTENT: ${{ secrets.TIZEN_CERT }} | |
- name: Clone jellyfin-tizen | |
uses: actions/checkout@v4 | |
with: | |
repository: 'jellyfin/jellyfin-tizen' | |
path: 'jellyfin-tizen' | |
ref: ${{ matrix.legacy == true && '8ebbd10643c10033223d6bf1d7fd7d59fba28fe1' || 'master' }} | |
- name: Clone jellyfin-web | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ matrix.repository }} | |
path: 'jellyfin-web' | |
ref: ${{ matrix.tag }} | |
- name: Build jellyfin-web | |
run: | | |
cd jellyfin-web | |
if ${{ matrix.legacy == true }}; then | |
SKIP_PREPARE=1 npm ci --no-audit | |
npm run build:production | |
else | |
npm ci --no-audit | |
USE_SYSTEM_FONTS=1 npm run build:production | |
fi | |
if ${{ matrix.inject_intros == true }}; then | |
wget -O dist/inject-intros.js https://raw.githubusercontent.com/intro-skipper/intro-skipper/refs/heads/10.10/IntroSkipper/Configuration/inject.js | |
sed -i 's/<\/head>/<script src="inject-intros.js"><\/script><\/head>/g' dist/index.html | |
fi | |
- name: Build jellyfin-tizen | |
id: buildMaster | |
run: | | |
cd jellyfin-tizen | |
if ${{ matrix.true_hd == true }}; then | |
sed -i 's/enableSsaRender: true/enableSsaRender: true, supportsTrueHd: true/g' tizen.js | |
fi | |
if ${{ matrix.secondary == true }}; then | |
sed -i 's/AprZAARz4r/JepZAARz4r/g' config.xml | |
sed -i 's/<name>Jellyfin<\/name>/<name>Jellyfin 2<\/name>/g' config.xml | |
rm icon.png | |
mv ../icon2.png icon.png | |
fi | |
if ${{ matrix.oblong_icon == true }}; then | |
rm icon.png | |
mv ../iconoblong.png icon.png | |
fi | |
if ${{ matrix.legacy == true }}; then | |
DISCARD_UNUSED_FONTS=1 JELLYFIN_WEB_DIR=../jellyfin-web/dist npm ci --no-audit | |
else | |
JELLYFIN_WEB_DIR=../jellyfin-web/dist npm ci --no-audit | |
fi | |
- name: Build Package | |
if: success() || steps.buildMaster.conclusion == 'success' | |
run: | | |
cd jellyfin-tizen | |
../tizen-studio/tools/ide/bin/tizen build-web -e ".*" -e gulpfile.js -e README.md -e "node_modules/*" -e "package*.json" -e "yarn.lock" | |
- name: Prepare for password prompt | |
if: success() || steps.buildMaster.conclusion == 'success' | |
run: | | |
sed -i "s|${GITHUB_WORKSPACE}/tizencert.pwd|1234|g" ${GITHUB_WORKSPACE}/tizen-studio-data/profile/profiles.xml | |
sed -i "s|${GITHUB_WORKSPACE}/tizen-studio-data/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.pwd|tizenpkcs12passfordsigner|g" ${GITHUB_WORKSPACE}/tizen-studio-data/profile/profiles.xml | |
sed -i 's|password=""|password="tizenpkcs12passfordsigner"|g' ${GITHUB_WORKSPACE}/tizen-studio-data/profile/profiles.xml | |
- name: Package WGT | |
if: success() || steps.buildMaster.conclusion == 'success' | |
run: | | |
expect ./package.exp | |
if ${{ matrix.artifact_name != 'Jellyfin' }}; then | |
if ${{ matrix.secondary == true }}; then | |
mv "./jellyfin-tizen/release/Jellyfin 2.wgt" "./jellyfin-tizen/release/${{ matrix.artifact_name }}.wgt" | |
else | |
mv "./jellyfin-tizen/release/Jellyfin.wgt" "./jellyfin-tizen/release/${{ matrix.artifact_name }}.wgt" | |
fi | |
fi | |
- name: Print logs | |
if: always() | |
run: cat ./tizen-studio-data/cli/logs/cli.log | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact_name }} | |
path: jellyfin-tizen/release/${{ matrix.artifact_name }}.wgt | |
retention-days: 5 | |
release: | |
name: Publish the release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Get current date | |
id: date | |
run: | | |
echo "date_tag=$(date +'%Y-%m-%d-%H%M')" >> $GITHUB_OUTPUT | |
echo "date=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_OUTPUT | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v4 | |
- name: List all directories | |
run: ls | |
- name: Check if any artifacts exists | |
shell: bash | |
run: | | |
count=$(find . -type f -name '*.wgt' -printf x | wc -c) | |
if [ $count -le 0 ]; then | |
echo "::error title=NoWGT::No wgt files were built" | |
exit 1 | |
fi | |
- name: Release Build Result | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: '${{ steps.date.outputs.date_tag }}' | |
name: '${{ steps.date.outputs.date }}' | |
files: | | |
**/*.wgt | |
body: "${{ github.event.inputs.rawMarkdown }}\n\nLook at the [readme](https://github.com/jeppevinkel/jellyfin-tizen-builds/blob/master/README.md) for information about the different versions.\n## Normal Version\nJellyfin-Web: [${{ github.event.inputs.webReleaseTagName }}](https://github.com/jellyfin/jellyfin-web/releases/tag/${{ github.event.inputs.webReleaseTagName }}) \n## 10.9.z Version\nJellyfin-web: [release-10.9.z](https://github.com/jellyfin/jellyfin-web/tree/release-10.9.z) \n## 10.8.z Version\nJellyfin-web: [release-10.8.z](https://github.com/jellyfin/jellyfin-web/tree/release-10.8.z) \n## Master Version\nJellyfin-web: [master](https://github.com/jellyfin/jellyfin-web)" | |
prerelease: ${{ github.event.inputs.prerelease }} | |