-
-
Notifications
You must be signed in to change notification settings - Fork 28
65 lines (63 loc) · 1.99 KB
/
dist-build-windows.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build Windows binary
on:
workflow_dispatch: {}
workflow_call:
push:
tags:
- '*'
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Determine App Version
working-directory: client/
run: |
python ..\.github\scripts\get_version.py
- name: Build wheel
shell: bash
working-directory: client/
run: |
poetry build
- name: Setup PyAPP and build
env:
PYAPP_FULL_ISOLATION: 1
PYAPP_PROJECT_NAME: gefyra
PYAPP_EXEC_SPEC: gefyra.cli.main:main
PYAPP_PIP_EXTRA_ARGS: click alive-progress tabulate cli-tracker
PYAPP_DISTRIBUTION_EMBED: 1
working-directory: client/
run: |
Invoke-WebRequest 'https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz' -OutFile .\pyapp-source.tar.gz
7z x pyapp-source.tar.gz
7z x pyapp-source.tar
mv pyapp-v* pyapp-latest
cd pyapp-latest
ls
cargo build --release
mkdir ..\dist-exe
copy .\target\release\pyapp.exe ..\dist-exe\gefyra.exe
copy README.md ../dist-exe/
ls ../dist-exe
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: gefyra-${{ env.PYAPP_PROJECT_VERSION }}-windows-x86_64
path: |
client/dist-exe/
retention-days: 5
- name: Create release zip
working-directory: client/
if: ${{ github.event.release && github.event.action == 'published' }}
run: 7z a -r gefyra-${{ env.PYAPP_PROJECT_VERSION }}-windows-x86_64.zip "dist-exe/"
- name: Attach files to release
uses: softprops/action-gh-release@v2
if: ${{ github.event.release && github.event.action == 'published' }}
with:
files: client/gefyra-${{ env.PYAPP_PROJECT_VERSION }}-windows-x86_64.zip