Finalize Github actions #17
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 (Windows) | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Initialize submodules | |
run: | | |
git submodule update --init --recursive | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install -r requirements.txt # Replace with your requirements file if needed | |
- name: Run build script | |
run: | | |
.\build.bat # Assuming your bat file is named build.bat | |
- name: Create ZIP archive | |
run: | | |
Compress-Archive -Path dist\* -DestinationPath Corvid-pre-release-${{ github.run_number }}.zip | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: Corvid-pre-release-${{ github.run_number }}.zip | |
- name: Create Release | |
uses: ncipollo/[email protected] | |
with: | |
name: Corvid pre-release build ${{ github.run_number }} | |
tag: pre-release | |
body: "Built from commit ${{ github.sha }}" | |
draft: false | |
artifacts: "Corvid-pre-release-${{ github.run_number }}.zip" |