Fix: BUILD try a first version of CI/CD building #15
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: 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.zip | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: henskan.zip | |
path: henskan.zip | |
- name: Create Tag | |
id: create_tag | |
run: | | |
git tag -f v0.2 | |
git push origin v0.2 || true | |
- name: Create Release | |
id: create_release | |
uses: softprops/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v0.2 | |
#release_name: Release v0.2 | |
draft: true | |
prerelease: true | |
- name: Upload Release Asset | |
uses: softprops/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: henskan.zip | |
tag_name: v0.2 |