This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
Configure Renovate #203
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: CI | |
on: | |
pull_request: | |
branches: [master, nightly] | |
types: [opened, synchronize, reopened] | |
push: | |
branches: [master] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check_changelog: | |
name: Check Changelog | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Verify Changelog | |
id: verify_changelog | |
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }} | |
# base_ref for pull request check, ref for push | |
uses: LizardByte/.github/actions/verify_changelog@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
next_version: ${{ steps.verify_changelog.outputs.changelog_parser_version }} | |
last_version: ${{ steps.verify_changelog.outputs.latest_release_tag_name }} | |
release_body: ${{ steps.verify_changelog.outputs.changelog_parser_description }} | |
build: | |
runs-on: ubuntu-20.04 | |
needs: check_changelog | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: RetroArcher-plex.bundle | |
- name: Set up Python | |
uses: LizardByte/setup-python-action@v2023.10.23-7bf3fc9 | |
with: | |
python-version: '2.7' | |
- name: Set up Python Dependencies | |
working-directory: RetroArcher-plex.bundle | |
run: | | |
echo "Installing Requirements" | |
python --version | |
python -m pip --no-python-version-warning --disable-pip-version-check install --upgrade pip setuptools | |
# install dev requirements | |
python -m pip install --upgrade -r requirements-dev.txt | |
python -m pip install --upgrade --target=./Contents/Libraries/Shared -r \ | |
requirements.txt --no-warn-script-location | |
- name: Build plist | |
working-directory: RetroArcher-plex.bundle | |
env: | |
BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version }} | |
run: | | |
python scripts/build_plist.py | |
- name: Test Plex Agent | |
working-directory: RetroArcher-plex.bundle | |
run: | | |
python ./Contents/Code/__init__.py | |
- name: Upload Artifacts | |
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: RetroArcher-plex.bundle | |
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | |
path: | | |
${{ github.workspace }} | |
!**/*.git* | |
!**/*.pyc | |
!**/__pycache__ | |
!**/plexhints* | |
!**/RetroArcher-plex.bundle/.* | |
!**/RetroArcher-plex.bundle/cache.sqlite | |
!**/RetroArcher-plex.bundle/DOCKER_README.md | |
!**/RetroArcher-plex.bundle/Dockerfile | |
!**/RetroArcher-plex.bundle/docs | |
!**/RetroArcher-plex.bundle/scripts | |
- name: Package Release | |
shell: bash | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
7z \ | |
"-xr!*.git*" \ | |
"-xr!*.pyc" \ | |
"-xr!__pycache__" \ | |
"-xr!plexhints*" \ | |
"-xr!RetroArcher-plex.bundle/.*" \ | |
"-xr!RetroArcher-plex.bundle/cache.sqlite" \ | |
"-xr!RetroArcher-plex.bundle/DOCKER_README.md" \ | |
"-xr!RetroArcher-plex.bundle/Dockerfile" \ | |
"-xr!RetroArcher-plex.bundle/docs" \ | |
"-xr!RetroArcher-plex.bundle/scripts" \ | |
a "./RetroArcher-plex.bundle.zip" "RetroArcher-plex.bundle" | |
mkdir artifacts | |
mv ./RetroArcher-plex.bundle.zip ./artifacts/ | |
- name: Create Release | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
uses: LizardByte/.github/actions/create_release@master | |
with: | |
token: ${{ secrets.GH_BOT_TOKEN }} | |
next_version: ${{ needs.check_changelog.outputs.next_version }} | |
last_version: ${{ needs.check_changelog.outputs.last_version }} | |
release_body: ${{ needs.check_changelog.outputs.release_body }} |