-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (54 loc) · 1.49 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
55
56
57
58
59
60
61
62
63
name: Build
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build exe file
run: |
pip install pyinstaller
pyinstaller --onefile --noconsole UpdateWeather.py
- name: Copy files to package
run: |
mkdir -p UpdateWeather
cp dist/UpdateWeather.exe UpdateWeather/
cp config.ini UpdateWeather/
cp hidapi-win.zip UpdateWeather/
cp -r img/ UpdateWeather/
cp README.md UpdateWeather/
- name: Compress release files
run: |
7z a -tzip UpdateWeather.zip UpdateWeather
- name: Create release archive
uses: actions/upload-artifact@v3
with:
name: release
path: UpdateWeather.zip
- name: Create Release
uses: ncipollo/[email protected]
with:
body: |
${{ github.event.head_commit.message }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release archive
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: UpdateWeather.zip
asset_name: UpdateWeather.zip
tag: ${{ github.ref }}