Repository navigation
54 lines (45 loc) · 1.41 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (45 loc) · 1.41 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
51
52
53
54
name: Build and Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
asset_name: Python-Turtle-Chess-V1-Linux
executable: dist/Python-Turtle-Chess-V1-Linux
- os: macos-latest
asset_name: Python-Turtle-Chess-V1-macOS
executable: dist/Python-Turtle-Chess-V1-macOS
- os: windows-latest
asset_name: Python-Turtle-Chess-V1-Windows.exe
executable: dist/Python-Turtle-Chess-V1-Windows.exe
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Install tk (Linux only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y python3-tk
- name: Build executable
run: |
pyinstaller --onefile --noconsole --name ${{ matrix.asset_name }} turts.py
- name: Upload to Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload V1 ${{ matrix.executable }} --clobber