-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (45 loc) · 1.19 KB
/
main.yml
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
name: Build Executable
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # Ensure you have a requirements.txt file
- name: Build executable
run: |
pip install pyinstaller
pyinstaller --onefile main.py # Change 'main.py' to your main script name
- name: Upload executable
uses: actions/upload-artifact@v2
with:
name: executable
path: dist/main
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: v1.0.0
release_name: Release v1.0.0
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
tag_name: v1.0.0
files: dist/main
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}