-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (47 loc) · 1.63 KB
/
executable.yml
File metadata and controls
50 lines (47 loc) · 1.63 KB
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
name: Create Executable via Pyinstaller
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.13.7"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Add poetry path
run: echo "C:\Users\runneradmin\.local\bin" >> $GITHUB_PATH
- name: Install dependencies
shell: bash
run: poetry install --no-interaction --no-root
- name: Create executable
shell: bash
run: poetry run pyinstaller pendulum.spec
- name: Zip dist Folder
run: Compress-Archive -Path ${{ github.workspace }}\dist\pendulum\* -Destination ${{ github.workspace }}\dist\pendulum_${{ github.ref_name }}.zip
- name: Add Folders to Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.ref_type == 'tag'
with:
files: |
${{ github.workspace }}\dist\pendulum_${{ github.ref_name }}.zip