Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
ci: move to pyuploadtool for release orchestration
Browse files Browse the repository at this point in the history
  • Loading branch information
srevinsaju committed Sep 19, 2021
1 parent 77e4b64 commit 463cb6d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 90 deletions.
109 changes: 19 additions & 90 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
Wheel:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -117,21 +117,14 @@ jobs:
python-version: '3.x'
architecture: ${{ matrix.arch }}

- name: Patch PySide2
if: matrix.qt == 'PySide2'
run: |
sed -i 's,PyQt5,PySide2,g' requirements.txt
sed -i 's,PyQt5,PySide2,g' setup.py
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install --upgrade setuptools wheel
pip3 install PyInstaller
pip3 install -r requirements.txt
pip3 install .
echo Done
pip3 install --upgrade pip wheel
pip3 install --upgrade poetry PyInstaller ${{ matrix.arch }}
poetry install -E pyinstaller -E ${{ matrix.qt }}
poetry build
pip3 install dist/*.whl
- name: Create .exe
run: |
echo "from guiscrcpy.cli import cli; cli()" > entry.py
Expand Down Expand Up @@ -163,21 +156,13 @@ jobs:
python-version: '3.x'
architecture: ${{ matrix.arch }}

- name: Patch PySide2
if: matrix.qt == 'PySide2'
run: |
brew install gnu-sed
gsed -i 's,PyQt5,PySide2,g' requirements.txt
gsed -i 's,PyQt5,PySide2,g' setup.py

- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install --upgrade setuptools wheel
pip3 install PyInstaller
pip3 install -r requirements.txt
pip3 install .
echo Done
pip3 install --upgrade pip wheel
pip3 install --upgrade poetry PyInstaller ${{ matrix.arch }}
poetry build
pip3 install dist/*.whl
- name: Create .exe
run: |
Expand All @@ -196,70 +181,14 @@ jobs:
Release:
needs: [Windows, AppImage, Wheel, MacOS]
runs-on: ubuntu-latest
strategy:
matrix:
version: [3.8]

steps:
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-PyQt5-x86-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-PyQt5-x64-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-PySide2-x86-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-PySide2-x64-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-PySide2-x64-continuous.app
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-continuous-none-any-py3.whl
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-r-continuous-x86_64.AppImage
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-m-continuous-x86_64.AppImage

- name: PreRelease
uses: marvinpinto/action-automatic-releases@latest
if: github.ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags/') != true
with:
prerelease: true
draft: false
automatic_release_tag: continuous
title: continuous
files: |
guiscrcpy-PyQt5-x86-continuous.exe
guiscrcpy-PyQt5-x64-continuous.exe
guiscrcpy-PySide2-x86-continuous.exe
guiscrcpy-PySide2-x64-continuous.exe
guiscrcpy-PySide2-x64-continuous.app
guiscrcpy-continuous-none-any-py3.whl
guiscrcpy-m-continuous-x86_64.AppImage
guiscrcpy-r-continuous-x86_64.AppImage
- uses: actions/download-artifact@v2

repo_token: ${{ secrets.GITHUB_TOKEN }}

- name: Release
uses: marvinpinto/action-automatic-releases@latest
if: startsWith(github.ref, 'refs/tags/v')
with:
prerelease: false
draft: true
files: |
guiscrcpy-PyQt5-x86-continuous.exe
guiscrcpy-PyQt5-x64-continuous.exe
guiscrcpy-PySide2-x86-continuous.exe
guiscrcpy-PySide2-x64-continuous.exe
guiscrcpy-PySide2-x64-continuous.app
guiscrcpy-continuous-none-any-py3.whl
guiscrcpy-m-continuous-x86_64.AppImage
guiscrcpy-r-continuous-x86_64.AppImage
repo_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create release and upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG_TYPE: conventional
run: |
wget -q https://github.com/srevinsaju/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage && chmod +x pyuploadtool-x86_64.AppImage
./pyuploadtool-x86_64.AppImage */guiscrcpy*.*
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ colorama = "^0.4.4"
click = "^8.0.1"
QtPy = "^1.9.0"
PyQt5 = {version = "^5.15.4", optional = true}
PyInstaller = {version = "*", optional = true}
PySide2 = {version = "^5.15.2", optional = true}
CairoSVG = {version = "^2.5.2", optional = true}

Expand All @@ -26,6 +27,7 @@ black = "^21.7b0"
[tool.poetry.extras]
pyqt5 = ["pyqt5"]
pyside2 = ["pyside2"]
pyinstaller = ["pyinstaller"]

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit 463cb6d

Please sign in to comment.