-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.26 KB
/
main.yaml
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
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: "windows-latest"
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11
- run: pip install -r requirements.txt pyinstaller
- run: pyinstaller --clean --noconfirm --log-level=WARN --add-data "src/*.png;." --add-data "src/*.ico;." --icon=src/favicon.ico --onefile --noconsole --name=MonitorBrightnessScheduler src/main.py
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release-${{ steps.date.outputs.date }}
release_name: Release ${{ steps.date.outputs.date }}
draft: false
prerelease: false
- name: Release with Notes
uses: softprops/action-gh-release@v1
with:
tag_name: release-${{ steps.date.outputs.date }}
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}