From 56994213a1fa23fadb01f361004fa195924d14cb Mon Sep 17 00:00:00 2001 From: Marcos Junior Date: Sun, 15 Dec 2024 10:47:48 -0600 Subject: [PATCH] Add deploy script --- .github/workflows/build.yml | 20 -------------------- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ src/WebAppManagerWindow.py | 6 +++--- 3 files changed, 38 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index c921e86..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Build - -on: - push: - branches: - - master - pull_request: - branches: - - master - workflow_dispatch: - -jobs: - build: - uses: linuxmint/github-actions/.github/workflows/do-builds.yml@master - with: - commit_id: master - ############################## Comma separated list - like 'linuxmint/xapp, linuxmint/cinnamon-desktop' - dependencies: - ############################## - diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8864abb --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +name: Deploy +on: + release: + types: [created] + +jobs: + flatpak: + name: "Flatpak" + runs-on: ubuntu-latest + container: + image: bilelmoussaoui/flatpak-github-actions:kde-6.7 + options: --privileged + steps: + - uses: actions/checkout@v4 + - bash: | + VERSION=${GITHUB_REF##*/} + echo "APP_VERSION=$VERSION" >> $GITHUB_ENV + echo "APP_VERSION=$VERSION" > src/version.py + - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + name: "Build" + with: + bundle: io.github.junalmeida.webapps_manager.flatpak + manifest-path: io.github.junalmeida.webapps_manager.json + cache-key: flatpak-builder-${{ github.sha }} + - name: Upload to Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: io.github.junalmeida.webapps_manager.flatpak + # - uses: flatpak/flatpak-github-actions/flat-manager@v6 + # name: "Deploy" + # with: + # repository: flathub + # flat-manager-url: https://flatpak-api.elementary.io + # token: some_very_hidden_token diff --git a/src/WebAppManagerWindow.py b/src/WebAppManagerWindow.py index 279fd70..dc7e6d1 100644 --- a/src/WebAppManagerWindow.py +++ b/src/WebAppManagerWindow.py @@ -6,7 +6,7 @@ from PySide6.QtCore import Qt from webapps_manager.icons import XDG_APPLICATION_EXECUTABLE, XDG_APPLICATION_INTERNET from webapps_manager.browser import SUPPORTED_BROWSERS -from webapps_manager.common import IS_FLATPAK, REFERENCE_DPI, WebAppLauncher, APP +from webapps_manager.common import IS_FLATPAK, REFERENCE_DPI, WebAppLauncher, _ from webapps_manager.WebAppEdit import WebAppEdit from webapps_manager.WebAppManager import WebAppManager @@ -90,8 +90,8 @@ def actionLaunch_clicked(self): def actionAbout_clicked(self): - QMessageBox.about(self.__window, "About Web Apps", f""" -

Web Apps is a simple tool to manage web applications.

+ QMessageBox.about(self.__window, f"{_("About")} {self.__window.windowTitle()}", f""" +

{self.__window.windowTitle()} is a simple tool to manage web applications.

{APP_VERSION}

Home |