|
3 | 3 |
|
4 | 4 | on: |
5 | 5 | pull_request: |
6 | | - branches: [master] |
| 6 | + branches: [master, dev/standalone] # TODO: remove dev/standalone ... temporarily allow PRs to this branch |
7 | 7 | types: [opened, synchronize, reopened] |
8 | 8 | push: |
9 | 9 | branches: [master] |
@@ -37,94 +37,47 @@ jobs: |
37 | 37 | build: |
38 | 38 | needs: |
39 | 39 | - setup_release |
40 | | - runs-on: ubuntu-20.04 |
| 40 | + runs-on: ubuntu-latest |
| 41 | + # todo: pyinstaller will need to be a strategy matrix |
41 | 42 |
|
42 | 43 | steps: |
43 | 44 | - name: Checkout |
44 | 45 | uses: actions/checkout@v4 |
45 | | - with: |
46 | | - path: Themerr-plex.bundle |
47 | | - submodules: recursive |
48 | 46 |
|
49 | 47 | - name: Set up Python |
50 | | - uses: LizardByte/setup-python-action@v2024.609.5111 |
| 48 | + uses: actions/setup-python@v5 |
51 | 49 | with: |
52 | | - python-version: '2.7' |
53 | | - |
54 | | - - name: Patch third-party deps |
55 | | - if: false # disabled |
56 | | - shell: bash |
57 | | - working-directory: Themerr-plex.bundle/third-party |
58 | | - run: | |
59 | | - patch_dir=${{ github.workspace }}/Themerr-plex.bundle/patches |
60 | | -
|
61 | | - # youtube-dl patches |
62 | | - pushd youtube-dl |
63 | | - git apply -v "${patch_dir}/youtube_dl-compat.patch" |
64 | | - popd |
| 50 | + python-version: '3.12' |
65 | 51 |
|
66 | 52 | - name: Set up Python Dependencies |
67 | 53 | shell: bash |
68 | | - working-directory: Themerr-plex.bundle |
69 | 54 | run: | |
70 | | - echo "Installing Requirements" |
71 | | - python --version |
72 | | - python -m pip --no-python-version-warning --disable-pip-version-check install --upgrade pip setuptools |
73 | | -
|
74 | | - # install dev requirements |
| 55 | + python -m pip install --upgrade pip setuptools wheel |
75 | 56 | python -m pip install --upgrade \ |
| 57 | + -r requirements.txt \ |
76 | 58 | -r requirements-build.txt \ |
77 | 59 | -r requirements-dev.txt |
78 | 60 |
|
79 | | - python -m pip install --upgrade --target=./Contents/Libraries/Shared \ |
80 | | - -r requirements.txt --no-warn-script-location |
81 | | -
|
82 | 61 | - name: Compile Locale Translations |
83 | | - working-directory: Themerr-plex.bundle |
84 | 62 | run: | |
85 | 63 | python ./scripts/_locale.py --compile |
86 | 64 |
|
87 | 65 | - name: Install npm packages |
88 | 66 | working-directory: Themerr-plex.bundle |
89 | 67 | run: | |
90 | 68 | npm install |
91 | | - mv ./node_modules ./Contents/Resources/web |
92 | 69 |
|
93 | | - - name: Build plist |
94 | | - shell: bash |
95 | | - working-directory: Themerr-plex.bundle |
96 | | - env: |
97 | | - BUILD_VERSION: ${{ needs.setup_release.outputs.release_tag }} |
98 | | - run: | |
99 | | - python ./scripts/build_plist.py |
| 70 | + # TODO: webpack? |
100 | 71 |
|
101 | | - - name: Package Release |
| 72 | + - name: Pyinstaller |
102 | 73 | shell: bash |
103 | 74 | run: | |
104 | | - 7z \ |
105 | | - "-xr!*.git*" \ |
106 | | - "-xr!*.pyc" \ |
107 | | - "-xr!__pycache__" \ |
108 | | - "-xr!plexhints*" \ |
109 | | - "-xr!Themerr-plex.bundle/.*" \ |
110 | | - "-xr!Themerr-plex.bundle/cache.sqlite" \ |
111 | | - "-xr!Themerr-plex.bundle/codecov.yml" \ |
112 | | - "-xr!Themerr-plex.bundle/crowdin.yml" \ |
113 | | - "-xr!Themerr-plex.bundle/DOCKER_README.md" \ |
114 | | - "-xr!Themerr-plex.bundle/Dockerfile" \ |
115 | | - "-xr!Themerr-plex.bundle/docs" \ |
116 | | - "-xr!Themerr-plex.bundle/patches" \ |
117 | | - "-xr!Themerr-plex.bundle/scripts" \ |
118 | | - "-xr!Themerr-plex.bundle/tests" \ |
119 | | - a "./Themerr-plex.bundle.zip" "Themerr-plex.bundle" |
120 | | -
|
121 | | - mkdir artifacts |
122 | | - mv ./Themerr-plex.bundle.zip ./artifacts/ |
| 75 | + # TODO: pyinstaller |
123 | 76 |
|
124 | 77 | - name: Upload Artifacts |
125 | 78 | uses: actions/upload-artifact@v4 |
126 | 79 | with: |
127 | | - name: Themerr-plex.bundle |
| 80 | + name: Themerr-plex |
128 | 81 | if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` |
129 | 82 | path: | |
130 | 83 | ${{ github.workspace }}/artifacts |
|
0 commit comments