Skip to content

Commit

Permalink
add binary release workflow (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: ddvk <ddvk>
  • Loading branch information
ddvk authored Jan 26, 2022
1 parent aa75e28 commit 384eda3
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/windows-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Windows Binary Package

on:
push:
tags:
- 'v*'

jobs:
build-win-amd64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Get the version
id: get_version
shell: bash
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Set up Python 3.9 amd64
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
- name: Install dependencies
shell: cmd
run: |
python -m pip install --upgrade pip
python -m venv venv64
venv64\Scripts\python -m pip install --upgrade pip wheel setuptools pyinstaller
venv64\Scripts\python -m pip install .
- name: Make package
shell: cmd
run: |
venv64\Scripts\pyinstaller -n rmview --collect-all rmview --icon=assets\rmview.ico -F ./src/rmview/__main__.py
md public
move dist\rmview.exe public\rmview.exe
- name: Package into zip
uses: papeloto/action-zip@v1
with:
files: public/
recursive: false
dest: rmview_win_amd64_${{ steps.get_version.outputs.VERSION }}.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
#body_path: doc/CHANGELOG-${{ steps.get_version.outputs.VERSION }}.txt
files: rmview_win_amd64_${{ steps.get_version.outputs.VERSION }}.zip
6 changes: 4 additions & 2 deletions src/rmview/rmview.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pathlib
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
Expand Down Expand Up @@ -48,8 +49,9 @@ class rMViewApp(QApplication):

def __init__(self, args):
super(rMViewApp, self).__init__(args)

self.CONFIG_DIR = QStandardPaths.standardLocations(QStandardPaths.ConfigLocation)[0]
path = QStandardPaths.standardLocations(QStandardPaths.ConfigLocation)[0]
pathlib.Path(path).mkdir(parents=True, exist_ok=True)
self.CONFIG_DIR = path
self.DEFAULT_CONFIG = os.path.join(self.CONFIG_DIR, 'rmview.json')
self.LOCAL_KNOWN_HOSTS = os.path.join(self.CONFIG_DIR, 'rmview_known_hosts')

Expand Down

0 comments on commit 384eda3

Please sign in to comment.