-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from jellyfin/gha
Phase 1: Automate building the installer from manual trigger
- Loading branch information
Showing
6 changed files
with
128 additions
and
99 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
jellyfin_version: | ||
required: true | ||
type: string | ||
server_url: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
publish: | ||
runs-on: windows-latest | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Clone UX Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: jellyfin/jellyfin-ux | ||
path: .\jellyfin-ux | ||
|
||
- name: Setup Jellyfin server | ||
run: | | ||
Invoke-WebRequest '${{ inputs.server_url }}' -OutFile 'jellyfin.zip' | ||
Expand-Archive 'jellyfin.zip' | ||
Copy-Item ".\Support Files\LICENSE" -Destination $(Resolve-Path .\jellyfin\jellyfin_*) | ||
- name: Publish Tray | ||
run: dotnet publish -c Release -r win-x64 --no-self-contained --output $(Resolve-Path .\jellyfin\jellyfin_*) | ||
|
||
- name: Build installer | ||
run: | | ||
$env:InstallLocation = $(Resolve-Path .\jellyfin\jellyfin_*) | ||
makensis /Dx64 /DUXPATH=$(Resolve-Path .\jellyfin-ux) $(Join-Path -Path $(Resolve-Path .\nsis) -ChildPath jellyfin.nsi) | ||
- name: Rename Installer | ||
run: | | ||
cd .\nsis | ||
Rename-Item -Path .\jellyfin_*_windows-x64.exe -NewName ("jellyfin_${{ inputs.jellyfin_version }}_windows-x64.exe") | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: windows-x64 | ||
retention-days: 30 | ||
if-no-files-found: error | ||
path: .\nsis\jellyfin_*_windows-x64.exe | ||
|
||
- name: Upload to GitHub Release | ||
if: ${{ github.event_name == 'release' }} | ||
uses: shogo82148/[email protected] | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
overwrite: true | ||
asset_path: .\nsis\jellyfin_*_windows-x64.exe |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Build' | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
run: dotnet build -c Release |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Publish Stable-Pre' | ||
|
||
on: | ||
release: | ||
types: | ||
- "prereleased" | ||
workflow_dispatch: | ||
inputs: | ||
jellyfin_version: | ||
required: true | ||
type: string | ||
description: "The Jellyfin version (eg: 10.8.0-beta1, 10.8.0-beta2)" | ||
|
||
jobs: | ||
publish: | ||
uses: ./.github/workflows/_meta-publish.yaml | ||
with: | ||
jellyfin_version: ${{ github.event.release.tag_name || github.event.inputs.jellyfin_version }} | ||
server_url: ${{ format('https://repo.jellyfin.org/releases/server/windows/stable-pre/{0}/combined/jellyfin_{0}.zip', (github.event.release.tag_name || github.event.inputs.jellyfin_version)) }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Publish Stable' | ||
|
||
on: | ||
release: | ||
types: | ||
- "released" | ||
workflow_dispatch: | ||
inputs: | ||
jellyfin_version: | ||
required: true | ||
type: string | ||
description: "The Jellyfin version (eg: 10.8.0, 10.7.7)" | ||
|
||
jobs: | ||
publish: | ||
uses: ./.github/workflows/_meta-publish.yaml | ||
with: | ||
jellyfin_version: ${{ github.event.release.tag_name || github.event.inputs.jellyfin_version }} | ||
server_url: ${{ format('https://repo.jellyfin.org/releases/server/windows/stable/combined/jellyfin_{0}.zip', (github.event.release.tag_name || github.event.inputs.jellyfin_version)) }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Publish Unstable' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
jellyfin_version: | ||
required: true | ||
type: string | ||
description: "The Jellyfin version (eg: 20220405.10)" | ||
|
||
jobs: | ||
publish: | ||
uses: ./.github/workflows/_meta-publish.yaml | ||
with: | ||
jellyfin_version: ${{ github.event.inputs.jellyfin_version }} | ||
server_url: ${{ format('https://repo.jellyfin.org/releases/server/windows/versions/unstable/combined/{0}/jellyfin_{0}-unstable.zip', github.event.inputs.jellyfin_version) }} |