mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
overhaul workflows to be less complex and more reliable
This commit is contained in:
parent
1526e0be54
commit
14f500e856
6 changed files with 56 additions and 61 deletions
39
.github/workflows/build.yaml
vendored
Normal file
39
.github/workflows/build.yaml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
name: Build Jellyfin-Kodi
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
py_version: [ 'py2', 'py3' ]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install pyyaml
|
||||
|
||||
- name: Create ${{ matrix.py_version }} addon.xml
|
||||
run: python .build/build.py --version ${{ matrix.py_version }} --source . --target .
|
||||
|
||||
- name: Publish Build Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
retention-days: 14
|
||||
name: ${{ matrix.py_version }}-build-artifact
|
||||
path: |
|
||||
*.zip
|
8
.github/workflows/create-release-pr.yaml
vendored
8
.github/workflows/create-release-pr.yaml
vendored
|
@ -13,14 +13,14 @@ jobs:
|
|||
uses: release-drafter/release-drafter@v5.15.0
|
||||
id: draft
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
||||
|
||||
- name: Setup YQ
|
||||
uses: chrisdickinson/setup-yq@latest
|
||||
with:
|
||||
yq-version: v4.9.1
|
||||
|
||||
- name: Pars Changhelog
|
||||
- name: Parse Changlog
|
||||
run: |
|
||||
cat << EOF >> cl.md
|
||||
${{ steps.draft.outputs.body }}
|
||||
|
@ -43,7 +43,7 @@ jobs:
|
|||
git config user.email "team@jellyfin.org"
|
||||
|
||||
git checkout -b prepare-${{ env.VERSION }}
|
||||
git commit -am "bump version"
|
||||
git commit -am "bump version to ${{ env.VERSION }}"
|
||||
|
||||
if [[ -z "$(git ls-remote --heads origin prepare-${{ env.VERSION }})" ]]; then
|
||||
git push origin prepare-${{ env.VERSION }}
|
||||
|
@ -54,7 +54,7 @@ jobs:
|
|||
- name: Create or Update PR
|
||||
uses: k3rnels-actions/pr-update@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.JF_BOT_TOKEN }}
|
||||
pr_title: Prepare for release ${{ steps.draft.outputs.tag_name }}
|
||||
pr_source: prepare-${{ env.VERSION }}
|
||||
pr_labels: 'release-prep,skip-changelog'
|
||||
|
|
31
.github/workflows/on-pr-merge.yaml
vendored
31
.github/workflows/on-pr-merge.yaml
vendored
|
@ -1,31 +0,0 @@
|
|||
name: On PR Merge
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- master
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
trigger_release:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'release-prep') }}
|
||||
steps:
|
||||
- name: Setup YQ
|
||||
uses: chrisdickinson/setup-yq@latest
|
||||
with:
|
||||
yq-version: v4.9.1
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Create Tag
|
||||
run: |
|
||||
git config user.name "jellyfin-bot"
|
||||
git config user.email "team@jellyfin.org"
|
||||
|
||||
VERSION="$(yq e -M '.version' release.yaml)"
|
||||
|
||||
git tag v${VERSION}
|
||||
git push origin v${VERSION}
|
|
@ -1,19 +1,22 @@
|
|||
name: Build Jellyfin-Kodi
|
||||
name: Publish Jellyfin-Kodi
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
py_version: [ 'py2', 'py3' ]
|
||||
steps:
|
||||
- name: Update Draft
|
||||
uses: release-drafter/release-drafter@v5.15.0
|
||||
with:
|
||||
publish: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
|
@ -38,18 +41,6 @@ jobs:
|
|||
path: |
|
||||
*.zip
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'jellyfin/jellyfin-kodi' }}
|
||||
strategy:
|
||||
matrix:
|
||||
py_version: [ 'py2', 'py3' ]
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.py_version }}-build-artifact
|
||||
|
||||
- name: Upload to repo server
|
||||
uses: burnett01/rsync-deployments@4.1
|
||||
with:
|
6
.github/workflows/release-drafter.yaml
vendored
6
.github/workflows/release-drafter.yaml
vendored
|
@ -4,8 +4,6 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
|
@ -14,7 +12,5 @@ jobs:
|
|||
steps:
|
||||
- name: Update Release Draft
|
||||
uses: release-drafter/release-drafter@v5.15.0
|
||||
with:
|
||||
publish: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
||||
|
|
4
.github/workflows/test.yaml
vendored
4
.github/workflows/test.yaml
vendored
|
@ -4,7 +4,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
@ -54,7 +54,7 @@ jobs:
|
|||
- name: Run reviewdog for PR checks-api
|
||||
if: ${{ env.PR_TRIGGERED == 'true' && matrix.py_version == '3.9' }}
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
||||
run: |
|
||||
cat flake8.output | reviewdog -reporter=github-pr-check -f=flake8 -name="flake8"
|
||||
|
||||
|
|
Loading…
Reference in a new issue