mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 08:42:59 -07:00
Add branch build installer workflow
This commit is contained in:
parent
4e0563bbf9
commit
3bf138e2ad
2 changed files with 21 additions and 128 deletions
15
.github/workflows/publish-release.yml
vendored
15
.github/workflows/publish-release.yml
vendored
|
@ -1,6 +1,7 @@
|
||||||
name: Publish Release
|
name: Publish Release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches: [master, beta, nightly, python3]
|
||||||
tags: [v*]
|
tags: [v*]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -14,10 +15,16 @@ jobs:
|
||||||
id: get_version
|
id: get_version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
VERSION_NSIS=${GITHUB_REF#refs/tags/v}.1
|
VERSION_NSIS=${GITHUB_REF#refs/tags/v}.1
|
||||||
echo ::set-output name=VERSION_NSIS::${VERSION_NSIS/%-beta.1/.0}
|
echo ::set-output name=VERSION_NSIS::${VERSION_NSIS/%-beta.1/.0}
|
||||||
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
|
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
|
||||||
echo ::set-output name=RELEASE_VERSION::${GITHUB_REF#refs/tags/}
|
echo ::set-output name=RELEASE_VERSION::${GITHUB_REF#refs/tags/}
|
||||||
|
else
|
||||||
|
echo ::set-output name=VERSION_NSIS::0.0.0.0
|
||||||
|
echo ::set-output name=VERSION::0.0.0
|
||||||
|
echo ::set-output name=RELEASE_VERSION::${GITHUB_SHA::7}
|
||||||
|
fi
|
||||||
echo $GITHUB_SHA > version.txt
|
echo $GITHUB_SHA > version.txt
|
||||||
|
|
||||||
- name: Set Up Python
|
- name: Set Up Python
|
||||||
|
@ -74,9 +81,15 @@ jobs:
|
||||||
id: get_version
|
id: get_version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
echo ::set-env name=VERSION::${GITHUB_REF#refs/tags/v}
|
echo ::set-env name=VERSION::${GITHUB_REF#refs/tags/v}
|
||||||
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
|
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
|
||||||
echo ::set-output name=RELEASE_VERSION::${GITHUB_REF#refs/tags/}
|
echo ::set-output name=RELEASE_VERSION::${GITHUB_REF#refs/tags/}
|
||||||
|
else
|
||||||
|
echo ::set-env name=VERSION::0.0.0
|
||||||
|
echo ::set-output name=VERSION::0.0.0
|
||||||
|
echo ::set-output name=RELEASE_VERSION::${GITHUB_SHA::7}
|
||||||
|
fi
|
||||||
echo $GITHUB_SHA > version.txt
|
echo $GITHUB_SHA > version.txt
|
||||||
|
|
||||||
- name: Set Up Python
|
- name: Set Up Python
|
||||||
|
@ -122,7 +135,7 @@ jobs:
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [build-windows, build-macos]
|
needs: [build-windows, build-macos]
|
||||||
if: always()
|
if: startsWith(github.ref, 'refs/tags/') && always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Get Build Job Status
|
- name: Get Build Job Status
|
||||||
|
|
120
.github/workflows/test-builds.yml
vendored
120
.github/workflows/test-builds.yml
vendored
|
@ -1,120 +0,0 @@
|
||||||
name: Publish Release
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [master, beta, nightly, python3]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v2.1.0
|
|
||||||
|
|
||||||
- name: Set Release Version
|
|
||||||
id: get_version
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo ::set-output name=VERSION_NSIS::0.0.0.0
|
|
||||||
echo ::set-output name=VERSION::0.0.0
|
|
||||||
echo ::set-output name=RELEASE_VERSION::${GITHUB_REF#refs/heads/}
|
|
||||||
echo $GITHUB_SHA > version.txt
|
|
||||||
|
|
||||||
- name: Set Up Python
|
|
||||||
uses: actions/setup-python@v1.2.0
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
|
|
||||||
- name: Cache Dependencies
|
|
||||||
id: cache_dependencies
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~\AppData\Local\pip\Cache
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('package/requirements-windows.txt') }}
|
|
||||||
restore-keys: ${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r package/requirements-windows.txt
|
|
||||||
|
|
||||||
- name: Build Package
|
|
||||||
run: |
|
|
||||||
pyinstaller -y ./package/Tautulli-windows.spec
|
|
||||||
|
|
||||||
- name: Create Installer
|
|
||||||
uses: joncloud/makensis-action@v1
|
|
||||||
with:
|
|
||||||
script-file: ./package/Tautulli.nsi
|
|
||||||
arguments: /DVERSION=${{ steps.get_version.outputs.VERSION_NSIS }} /DINSTALLER_NAME=..\Tautulli-windows-${{ steps.get_version.outputs.RELEASE_VERSION }}.exe
|
|
||||||
includeMorePlugins: package/nsis-plugins
|
|
||||||
|
|
||||||
- name: Upload Installer
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Tautulli-windows-installer
|
|
||||||
path: Tautulli-windows-${{ steps.get_version.outputs.RELEASE_VERSION }}.exe
|
|
||||||
|
|
||||||
- name: Post Status to Discord
|
|
||||||
uses: sarisia/actions-status-discord@v1
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
|
||||||
status: ${{ job.status }}
|
|
||||||
job: Build Windows Installer
|
|
||||||
nofail: true
|
|
||||||
|
|
||||||
build-macos:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v2.1.0
|
|
||||||
|
|
||||||
- name: Set Release Version
|
|
||||||
id: get_version
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo ::set-env name=VERSION::0.0.0
|
|
||||||
echo ::set-output name=VERSION::0.0.0
|
|
||||||
echo ::set-output name=RELEASE_VERSION::${GITHUB_REF#refs/heads/}
|
|
||||||
echo $GITHUB_SHA > version.txt
|
|
||||||
|
|
||||||
- name: Set Up Python
|
|
||||||
uses: actions/setup-python@v1.2.0
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
|
|
||||||
- name: Cache Dependencies
|
|
||||||
id: cache_dependencies
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/Library/Caches/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('package/requirements-macos.txt') }}
|
|
||||||
restore-keys: ${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r package/requirements-macos.txt
|
|
||||||
|
|
||||||
- name: Build Package
|
|
||||||
run: |
|
|
||||||
pyinstaller -y ./package/Tautulli-macos.spec
|
|
||||||
|
|
||||||
- name: Create Installer
|
|
||||||
run: |
|
|
||||||
sudo pkgbuild --install-location /Applications --version ${{ steps.get_version.outputs.VERSION }} --component ./dist/Tautulli.app --scripts ./package/macos-scripts Tautulli-macos-${{ steps.get_version.outputs.RELEASE_VERSION }}.pkg
|
|
||||||
|
|
||||||
- name: Upload Installer
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Tautulli-macos-installer
|
|
||||||
path: Tautulli-macos-${{ steps.get_version.outputs.RELEASE_VERSION }}.pkg
|
|
||||||
|
|
||||||
- name: Post Status to Discord
|
|
||||||
uses: sarisia/actions-status-discord@v1
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
|
||||||
status: ${{ job.status }}
|
|
||||||
job: Build MacOS Installer
|
|
||||||
nofail: true
|
|
Loading…
Add table
Add a link
Reference in a new issue