Skip to content

Commit

Permalink
create dev-build action
Browse files Browse the repository at this point in the history
  • Loading branch information
Echoosx committed Feb 3, 2024
1 parent 0ff9ed6 commit c80479a
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 8 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Package Application with Pyinstaller

on:
push:
branches: [ dev ]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'
architecture: 'x64'
cache: 'pip'
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: install req
run: pip install -r requirements.txt ; python -m unidic download ;

- name: dl upx
run: python .github\getLatestUPX.py; 7z x upx.zip; mv upx-* upx;

# - name: pack:full
# run: pyinstaller --upx-dir upx TransAssistant_full.spec -y ; mv dist/TransAssistant_full ./ ; 7z a -t7z TransAssistant_full.7z TransAssistant_full
#
# - name: pack:core
# run: pyinstaller --upx-dir upx TransAssistant_core.spec -y ; mv dist/TransAssistant_core ./ ; 7z a -t7z TransAssistant_core.7z TransAssistant_core
#
# - name: pack:core-lite
# run: pyinstaller --upx-dir upx TransAssistant_core-lite.spec -y ; mv dist/TransAssistant_core-lite ./ ; 7z a -t7z TransAssistant_core-lite.7z TransAssistant_core-lite

- name: pack:small
run: pyinstaller --upx-dir upx TransAssistant_small.spec -y ; mv dist/TransAssistant_small ./ ; 7z a -t7z TransAssistant_small.7z TransAssistant_small

- name: upload
uses: actions/upload-artifact@v3
with:
name: GUI
path: TransAssistant_*.7z

- name: release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: 'Release ${GITHUB_REF##*/}'
file: "TransAssistant_*.7z"
draft: false

16 changes: 8 additions & 8 deletions .github/workflows/pyInstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
- name: dl upx
run: python .github\getLatestUPX.py; 7z x upx.zip; mv upx-* upx;

# - name: pack:full
# run: pyinstaller --upx-dir upx TransAssistant_full.spec -y ; mv dist/TransAssistant_full ./ ; 7z a -t7z TransAssistant_full.7z TransAssistant_full
#
# - name: pack:core
# run: pyinstaller --upx-dir upx TransAssistant_core.spec -y ; mv dist/TransAssistant_core ./ ; 7z a -t7z TransAssistant_core.7z TransAssistant_core
#
# - name: pack:core-lite
# run: pyinstaller --upx-dir upx TransAssistant_core-lite.spec -y ; mv dist/TransAssistant_core-lite ./ ; 7z a -t7z TransAssistant_core-lite.7z TransAssistant_core-lite
- name: pack:full
run: pyinstaller --upx-dir upx TransAssistant_full.spec -y ; mv dist/TransAssistant_full ./ ; 7z a -t7z TransAssistant_full.7z TransAssistant_full

- name: pack:core
run: pyinstaller --upx-dir upx TransAssistant_core.spec -y ; mv dist/TransAssistant_core ./ ; 7z a -t7z TransAssistant_core.7z TransAssistant_core

- name: pack:core-lite
run: pyinstaller --upx-dir upx TransAssistant_core-lite.spec -y ; mv dist/TransAssistant_core-lite ./ ; 7z a -t7z TransAssistant_core-lite.7z TransAssistant_core-lite

- name: pack:small
run: pyinstaller --upx-dir upx TransAssistant_small.spec -y ; mv dist/TransAssistant_small ./ ; 7z a -t7z TransAssistant_small.7z TransAssistant_small
Expand Down

0 comments on commit c80479a

Please sign in to comment.