Skip to content

Commit

Permalink
Use fully qualified version numbers for CI
Browse files Browse the repository at this point in the history
🧹 Clean up CI after removing py2
  • Loading branch information
oddstr13 committed Feb 5, 2024
1 parent f1cd38a commit bdebed0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 39 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
py_version: [ 'py3' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v4.1.1

- name: Set up Python 3.x
uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@v5.0.0
with:
python-version: 3.9

Expand All @@ -27,13 +24,13 @@ jobs:
python -m pip install --upgrade pip
python -m pip install pyyaml
- name: Create ${{ matrix.py_version }} addon.xml
run: python build.py --version ${{ matrix.py_version }}
- name: Build addon
run: python build.py

- name: Publish Build Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v3.1.3
with:
retention-days: 14
name: ${{ matrix.py_version }}-build-artifact
name: py3-build-artifact
path: |
*.zip
19 changes: 8 additions & 11 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,23 @@ jobs:
if: ${{ github.repository == 'jellyfin/jellyfin-kodi' }}
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
version: ['3.9']
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v4.1.1

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v3.24.0
with:
languages: ${{ matrix.language }}
languages: 'python'
queries: +security-and-quality

- name: Set up Python ${{ matrix.version }}
uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.version }}
python-version: 3.9

- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v3.24.0

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v3.24.0
2 changes: 1 addition & 1 deletion .github/workflows/create-prepare-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
yq-version: v4.9.1

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v4.1.1

- name: Parse Changelog
run: |
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
py_version: [ 'py3' ]
steps:
- name: Update Draft
uses: release-drafter/[email protected]
if: ${{ matrix.py_version == 'py3' }}
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v4.1.1

- name: Set up Python 3.x
uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@v5.0.0
with:
python-version: 3.9

Expand All @@ -31,19 +27,19 @@ jobs:
python -m pip install --upgrade pip
python -m pip install pyyaml
- name: Create ${{ matrix.py_version }} addon.xml
run: python build.py --version ${{ matrix.py_version }}
- name: Build addon
run: python build.py

- name: Publish Build Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v3.1.3
with:
retention-days: 14
name: ${{ matrix.py_version }}-build-artifact
name: py3-build-artifact
path: |
*.zip
- name: Upload to repo server
uses: burnett01/rsync-deployments@5.2
uses: burnett01/rsync-deployments@6.0.0
with:
switches: -vrptz
path: '*.zip'
Expand All @@ -60,5 +56,5 @@ jobs:
key: ${{ secrets.DEPLOY_KEY }}
script_stop: true
script: |
python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.jellyfin+${{ matrix.py_version }}.zip --datadir /srv/repository/releases/client/kodi/${{ matrix.py_version }};
rm /srv/repository/incoming/kodi/plugin.video.jellyfin+${{ matrix.py_version }}.zip;
python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.jellyfin+py3.zip --datadir /srv/repository/releases/client/kodi/py3;
rm /srv/repository/incoming/kodi/plugin.video.jellyfin+py3.zip;
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v4.1.1

- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.py_version }}

Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
if: ${{ matrix.py_version == '3.11' }}

- name: Publish Test Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v3.1.3
with:
retention-days: 14
name: ${{ matrix.py_version }}-test-results
Expand Down

0 comments on commit bdebed0

Please sign in to comment.