-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch Windows build to portable workflow
- Loading branch information
1 parent
29f816f
commit 3b65d4b
Showing
5 changed files
with
74 additions
and
29 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -44,13 +44,8 @@ jobs: | |
run: sudo apt-get install make mmv | ||
|
||
- name: Build Linux | ||
if: ${{ contains(inputs.distro, 'debian') || contains(inputs.distro, 'ubuntu') }} | ||
run: ./build ${{ matrix.release }} ${{ matrix.arch }} dist | ||
|
||
- name: Build Windows | ||
if: ${{ contains(inputs.distro, 'windows') }} | ||
run: ./build-win64 dist | ||
|
||
- name: Upload Artifacts | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -92,7 +87,7 @@ jobs: | |
- name: Prepare Release Assets | ||
run: |- | ||
pushd artifact | ||
find * -type f \( -name "*.deb" -o -name "*.zip" \) | while read file; do | ||
find * -type f -name "*.deb" | while read file; do | ||
sha256sum "${file}" | tee "${file}.sha256sum" | ||
done | ||
popd | ||
|
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 |
---|---|---|
|
@@ -55,37 +55,59 @@ jobs: | |
arch: ${{fromJson(inputs.architectures)}} | ||
|
||
steps: | ||
- name: Set Versions | ||
uses: actions/[email protected] | ||
id: set_version | ||
with: | ||
script: | | ||
const tag = context.ref.substring(10) | ||
const no_v = tag.replace('v', '') | ||
const dash_index = no_v.lastIndexOf('-') | ||
const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v | ||
core.setOutput('tag', tag) | ||
core.setOutput('no-v', no_v) | ||
core.setOutput('no-dash', no_dash) | ||
- name: Download Artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ inputs.os }}-${{ matrix.arch }}-portable | ||
path: artifact | ||
|
||
- name: Prepare Release Assets | ||
run: |- | ||
pushd artifact | ||
find * -type f \( -name "*.xz" -o -name "*.zip" \) | while read file; do | ||
sha256sum "${file}" | tee "${file}.sha256sum" | ||
done | ||
popd | ||
- name: Upload GH Release Assets | ||
uses: shogo82148/[email protected] | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
overwrite: true | ||
asset_path: | | ||
./artifact/**/*.zip | ||
./artifact/**/*.tar.xz | ||
./artifact/**/*.sha256sum | ||
- name: Make Sure Release Directory Exists | ||
- name: Make Sure FFmpeg Directory Exists | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.deploy-host }} | ||
username: ${{ secrets.deploy-user }} | ||
key: ${{ secrets.deploy-key }} | ||
script_stop: true | ||
script: |- | ||
mkdir -p /srv/repository/releases/ffmpeg/ | ||
mkdir -p /srv/repository/releases/ffmpeg/${{ steps.set_version.outputs.no-v }}/ | ||
- name: Upload Release Assets | ||
uses: burnett01/[email protected] | ||
with: | ||
switches: -vrptz | ||
path: ./artifact/* | ||
remote_path: /srv/repository/releases/ffmpeg/ | ||
remote_path: /srv/repository/releases/ffmpeg/${{ steps.set_version.outputs.no-v }}/ | ||
remote_host: ${{ secrets.deploy-host }} | ||
remote_user: ${{ secrets.deploy-user }} | ||
remote_key: ${{ secrets.deploy-key }} |
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
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 |
---|---|---|
|
@@ -30,11 +30,10 @@ jobs: | |
deploy-user: ${{ secrets.DEPLOY_USER }} | ||
deploy-key: ${{ secrets.DEPLOY_KEY }} | ||
|
||
build_publish_windows: | ||
uses: ./.github/workflows/_meta.yaml | ||
build_publish_windows_portable: | ||
uses: ./.github/workflows/_meta_portable.yaml | ||
with: | ||
distro: 'windows' | ||
codenames: '["windows"]' | ||
os: 'windows' | ||
architectures: '["win64"]' | ||
release: true | ||
secrets: | ||
|
@@ -59,7 +58,6 @@ jobs: | |
needs: | ||
- build_publish_debian | ||
- build_publish_ubuntu | ||
- build_publish_windows | ||
strategy: | ||
fail-fast: true | ||
max-parallel: 1 | ||
|
@@ -71,7 +69,6 @@ jobs: | |
{distro: 'ubuntu', codename: 'jammy'}, | ||
{distro: 'ubuntu', codename: 'focal'}, | ||
{distro: 'ubuntu', codename: 'bionic'}, | ||
{distro: 'windows', codename: 'windows'}, | ||
] | ||
steps: | ||
- name: Sync mirrors and update symlinks | ||
|
@@ -88,20 +85,52 @@ jobs: | |
version="${tag#v}" | ||
basename="jellyfin-ffmpeg*_${version}-${{ matrix.arrays.codename }}" | ||
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/ -type l -name "jellyfin-ffmpeg*_*" -exec rm {} \; | ||
if [ "${{ matrix.arrays.distro }}" != "windows" ]; then | ||
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} -type f -name "${basename}_*.deb" | while read file; do | ||
reprepro -b /srv/repository/${{ matrix.arrays.distro }} --export=never --keepunreferencedfiles includedeb ${{ matrix.arrays.codename }} ${file} | ||
done | ||
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/ -type l -name "${basename}_*" -exec rm {} \; | ||
reprepro -b /srv/repository/${{ matrix.arrays.distro }} deleteunreferenced | ||
reprepro -b /srv/repository/${{ matrix.arrays.distro }} export | ||
fi | ||
if [ "${{ matrix.arrays.distro }}" == "windows" ]; then | ||
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}/${basename}_*.zip /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}/jellyfin-ffmpeg.zip | ||
fi | ||
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} -type f -name "${basename}_*.deb" | while read file; do | ||
reprepro -b /srv/repository/${{ matrix.arrays.distro }} --export=never --keepunreferencedfiles includedeb ${{ matrix.arrays.codename }} ${file} | ||
done | ||
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/ -type l -name "${basename}_*" -exec rm {} \; | ||
reprepro -b /srv/repository/${{ matrix.arrays.distro }} deleteunreferenced | ||
reprepro -b /srv/repository/${{ matrix.arrays.distro }} export | ||
rm -f /srv/repository/releases/server/${{ matrix.arrays.distro }}/ffmpeg | ||
rm -f /srv/repository/releases/server/${{ matrix.arrays.distro }}/{stable,stable-pre,unstable}/ffmpeg | ||
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/ffmpeg | ||
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/stable/ffmpeg | ||
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/stable-pre/ffmpeg | ||
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/unstable/ffmpeg | ||
maintain_repository_portable: | ||
name: Maintain Repository | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build_publish_windows_portable | ||
strategy: | ||
fail-fast: true | ||
max-parallel: 1 | ||
matrix: | ||
arrays: [ | ||
{distro: 'windows', codename: 'windows'}, | ||
] | ||
steps: | ||
- name: Update symlinks | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.DEPLOY_HOST }} | ||
username: ${{ secrets.DEPLOY_USER }} | ||
key: ${{ secrets.DEPLOY_KEY }} | ||
script_stop: true | ||
script: |- | ||
set -o errexit | ||
set -o xtrace | ||
tag="${{ github.event.release.tag_name }}" | ||
version="${tag#v}" | ||
basename="jellyfin-ffmpeg*_${version}-${{ matrix.arrays.codename }}" | ||
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/ -type l -name "jellyfin-ffmpeg*_*" -exec rm {} \; | ||
if [ "${{ matrix.arrays.distro }}" == "windows" ]; then | ||
ln -fs /srv/repository/releases/ffmpeg/${version}/${basename}_*.zip /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}/jellyfin-ffmpeg.zip | ||
fi | ||
rm -f /srv/repository/releases/server/${{ matrix.arrays.distro }}/ffmpeg | ||
rm -f /srv/repository/releases/server/${{ matrix.arrays.distro }}/{stable,stable-pre,unstable}/ffmpeg | ||
ln -fs /srv/repository/releases/ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/ffmpeg | ||
ln -fs /srv/repository/releases/server/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/stable/ffmpeg | ||
ln -fs /srv/repository/releases/server/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/stable-pre/ffmpeg | ||
ln -fs /srv/repository/releases/server/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/unstable/ffmpeg |
File renamed without changes.