diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..40900a2 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,63 @@ +name: Continuous Deployment + +on: + release: + types: [created] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt-get install -y desktop-file-utils + + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set clean version variable + run: | + VERSION=${{ github.event.release.tag_name }} + APP_VERSION=${VERSION#v} + echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV + echo $APP_VERSION + + - name: Set up python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install project dependencies + run: | + pip install -r requirements.txt + + - name: Build the app with Nuitka + run: | + nuitka --enable-plugin=pyside6 --include-data-dir=./assets=./assets --standalone --onefile --lto=yes --output-filename=protodesk app.py + + - name: Prepare AppImage contents + run: | + mkdir -p app.AppDir/usr/bin + cp protodesk app.AppDir/usr/bin/ + cp assets/logo.png app.AppDir/protodesk.png + + - name: Set up appimagetool + run: | + wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool + chmod +x appimagetool + + - name: Build the AppImage + run: | + ./appimagetool app.AppDir Protodesk-${{ env.APP_VERSION }}-x86_64.AppImage + + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url}} + asset_path: Protodesk-${{ env.APP_VERSION }}-x86_64.AppImage + asset_name: Protodesk-${{ env.APP_VERSION }}-x86_64.AppImage + asset_content_type: application/octet-stream diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1105ea..3f6b60e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,60 +25,3 @@ jobs: - name: Run flake8 run: | flake8 . - - build: - runs-on: ubuntu-latest - steps: - - name: Install dependencies - run: | - sudo apt-get install -y desktop-file-utils - - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set clean version variable - run: | - VERSION=${{ github.event.release.tag_name }} - APP_VERSION=${VERSION#v} - echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV - echo $APP_VERSION - - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: '3.12' - - - name: Install project dependencies - run: | - pip install -r requirements.txt - - - name: Build the app with Nuitka - run: | - nuitka --enable-plugin=pyside6 --include-data-dir=./assets=./assets --standalone --onefile --lto=yes --output-filename=protodesk app.py - - - name: Prepare AppImage contents - run: | - mkdir -p app.AppDir/usr/bin - cp protodesk app.AppDir/usr/bin/ - cp assets/logo.png app.AppDir/protodesk.png - - - name: Set up appimagetool - run: | - wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool - chmod +x appimagetool - - - name: Build the AppImage - run: | - ./appimagetool app.AppDir Protodesk-${APP_VERSION}-x86_64.AppImage - - # - name: Upload release asset - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # upload_url: ${{ github.event.release.upload_url}} - # asset_path: Protodesk-${{ env.APP_VERSION }}-${{ matrix.arch }}.AppImage - # asset_name: Protodesk-${{ env.APP_VERSION }}-${{ matrix.arch }}.AppImage - # asset_content_type: application/octet-stream diff --git a/.gitignore b/.gitignore index 0683ce7..219d308 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ app.onefile-build/ protodesk .DirIcon *.AppImage -Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3829d82..0000000 --- a/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM python:3.12-bullseye - -ARG APP_VERSION -ARG ARCH -# ENV APP_VERSION=${APP_VERSION} -# ENV ARCH=${ARCH} - -WORKDIR /app - -RUN apt-get update && apt-get install -y patchelf desktop-file-utils libfuse2 - -COPY . /app - -# create and activate a virtual environment -RUN python -m venv .venv && chmod +x .venv/bin/activate && .venv/bin/activate - -# install project dependencies -RUN pip install -r requirements.txt - -# build the app with Nuitka -RUN nuitka --enable-plugin=pyside6 --include-data-dir=./assets=./assets --standalone --onefile --lto=yes --output-filename=protodesk app.py - -# prepare AppImage directory -RUN mkdir -p app.AppDir/usr/bin -RUN cp protodesk app.AppDir/usr/bin/ -RUN cp assets/logo.png app.AppDir/protodesk.png - -# set up appimagetool -RUN bash -c "\ - if [ "$(uname -m)" == "x86_64" ]; then \ - wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool; \ - elif [ "$(uname -m)" == "aarch64" ]; then \ - wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage -O appimagetool; \ - fi && \ - chmod +x appimagetool \ - " - -# build the AppImage -RUN ./appimagetool app.AppDir Protodesk-${APP_VERSION}-${ARCH}.AppImage diff --git a/README.md b/README.md index 9acabe8..1b96ea9 100644 --- a/README.md +++ b/README.md @@ -55,5 +55,5 @@ and maintenance, you are welcome to do so using any of these channels: ## Developers & Maintainers -1. Nemuel Wainaina - - **Email**: [nemuelwainaina@proton.me](mailto:nemuelwainaina@proton.me) +Nemuel Wainaina + - **Email**: [nemuelwainaina@proton.me](mailto:nemuelwainaina@proton.me) diff --git a/app.py b/app.py index 0ff005e..3497a82 100644 --- a/app.py +++ b/app.py @@ -213,7 +213,7 @@ def __init__(self, parent=None): title_label.setAlignment(Qt.AlignCenter) layout.addWidget(title_label) - info_label = QLabel('Version 1.2.7\nUnofficial desktop app for Proton.') + info_label = QLabel('Version 1.3.0\nUnofficial desktop app for Proton.') info_label.setAlignment(Qt.AlignCenter) layout.addWidget(info_label)