Update Python version to 3.10.10 #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
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.10.10 | |
- 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 }} |