Create build workflow #1
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 BSP Edit | |
on: | |
push: | |
branches: main | |
jobs: | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Install Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.7' | |
architecture: 'x64' | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Run PyInstaller | |
run: | | |
python -m PyInstaller BSP_Edit.spec | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: Windows BSP Edit | |
path: 'dist/BSP Edit.exe' | |
- name: create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: "latest" | |
release_name: "latest" | |
overwrite: true | |
body: | | |
Latest Build | |
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.outputs.upload_url}} | |
asset_path: 'dist/BSP Edit.exe' | |
asset_name: BSP-Edit-Windows-amd64.exe | |
asset_content_type: application/zip |