-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.78 KB
/
release.yml
File metadata and controls
67 lines (57 loc) · 1.78 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
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
artifact_name: smartboot-linux
asset_name: smartboot-linux-x64
- os: windows-latest
artifact_name: smartboot-windows
asset_name: smartboot-windows-x64.exe
- os: macos-latest
artifact_name: smartboot-macos
asset_name: smartboot-macos-x64
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build with PyInstaller
run: |
pyinstaller --onefile --windowed --name=smartboot --icon=assets/icons/smartboot.ico main.py
- name: Rename artifact (Windows)
if: matrix.os == 'windows-latest'
run: |
mv dist/smartboot.exe dist/${{ matrix.asset_name }}
- name: Rename artifact (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
mv dist/smartboot dist/${{ matrix.asset_name }}
chmod +x dist/${{ matrix.asset_name }}
- name: Rename artifact (macOS)
if: matrix.os == 'macos-latest'
run: |
mv dist/smartboot dist/${{ matrix.asset_name }}
chmod +x dist/${{ matrix.asset_name }}
- name: Create release
uses: softprops/action-gh-release@v1
with:
files: dist/${{ matrix.asset_name }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}