Skip to content

Merge pull request #8 from HellSakura/Dev #22

Merge pull request #8 from HellSakura/Dev

Merge pull request #8 from HellSakura/Dev #22

Workflow file for this run

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 }}