Enh: README and images for doc #19
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 and Release with PyInstaller | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Read version from file | |
id: read_version | |
run: | | |
$version = Get-Content henskan/version.txt | |
echo "VERSION=$version" >> $env:GITHUB_ENV | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build with PyInstaller | |
run: | | |
pyinstaller --noconfirm henskan.spec | |
- name: Compress dist directory | |
run: | | |
powershell Compress-Archive -Path dist\henskan -DestinationPath henskan-portable-v${{ env.VERSION }}.zip | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: henskan-portable-v${{ env.VERSION }}.zip | |
path: henskan-portable-v${{ env.VERSION }}.zip | |
- name: Create Tag | |
id: create_tag | |
run: | | |
git tag -f v${{ env.VERSION }} | |
git push origin v${{ env.VERSION }} || true | |
- name: Create Release | |
id: create_release | |
uses: softprops/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ env.VERSION }} | |
draft: true | |
prerelease: true | |
- name: Upload Release Asset | |
uses: softprops/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: henskan-portable-v${{ env.VERSION }}.zip | |
tag_name: v${{ env.VERSION }} |