trying sha again #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
#This workflow will install Python dependencies (including ImageMagic), then create an executable of the python script | |
name: Build exe | |
on: | |
push: | |
branches: ["**"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
(new-object System.Net.WebClient).DownloadFile('https://imagemagick.org/archive/binaries/ImageMagick-7.1.1-27-portable-Q8-x64.zip', 'C:\ImageMagick-7.1.1-27-portable-Q8-x64.zip') | |
unzip C:\ImageMagick-7.1.1-27-portable-Q8-x64.zip | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install PyInstaller | |
- name: Run PyInstaller | |
run: | | |
python -m PyInstaller --onefile --noconsole --name "classiPY" ${{ github.workspace }}/src/classiPY.py | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: classiPY | |
path: dist/classiPY.exe | |
- name: create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${LAST_COMMIT_SHA:0:7} | |
release_name: Release ${LAST_COMMIT_SHA:0:7} | |
body: | | |
Test Release v0.0.1 | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.output.upload_url }} | |
asset_path: dist/classiPY.exe | |
asset_name: classiPY.exe | |
asset_content_type: application/zip |