-
-
Notifications
You must be signed in to change notification settings - Fork 28
59 lines (55 loc) · 2.02 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
# This workflow will build a PyOxidizer binary for Windows when a tag is pushed
name: Build Windows binary
env:
PYOXIDIZER_DOWNLOAD: https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F0.20.0/PyOxidizer-0.20.0-exe-x86_64-pc-windows.zip
on:
workflow_dispatch: {}
workflow_call:
push:
tags:
- '*'
release:
types: [published]
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Determine App Version
working-directory: client/
run: |
python ..\.github\scripts\get_version.py
echo "${{ env.APP_VERSION }}"
- name: Setup PyOxidizer and build
working-directory: client/
run: |
Invoke-WebRequest 'https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F0.20.0/PyOxidizer-0.20.0-exe-x86_64-pc-windows.zip' -OutFile .\PyOxidizer-0.20.0-exe-x86_64-pc-windows.zip
7z x PyOxidizer-0.20.0-exe-x86_64-pc-windows.zip
ls
mkdir build\x86_64-pc-windows-msvc\release\wininstall\
./pyoxidizer.exe build wininstall --release
ls .\build\x86_64-pc-windows-msvc\release\wininstall\
mkdir dist
xcopy .\build\x86_64-pc-windows-msvc\release\wininstall\* .\dist /s /e /k /i /y
copy README.md ./dist/
ls ./dist
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: gefyra-${{ env.APP_VERSION }}-windows-x86_64
path: |
client/dist/
retention-days: 5
- name: Create release zip
working-directory: client/
if: ${{ github.event.release && github.event.action == 'published' }}
run: 7z a -r gefyra-${{ env.APP_VERSION }}-windows-x86_64.zip "dist/"
- name: Attach files to release
uses: softprops/action-gh-release@v1
if: ${{ github.event.release && github.event.action == 'published' }}
with:
files: client/gefyra-${{ env.APP_VERSION }}-windows-x86_64.zip