PaiGramMetadata/.github/workflows/release.yml

59 lines
1.3 KiB
YAML
Raw Normal View History

2023-11-08 06:36:56 +00:00
name: Build
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- '**.json'
tags:
- '**'
workflow_dispatch: ~
jobs:
build-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Create and start virtual environment
shell: bash
run: |
python3 -m venv venv
echo source venv/Scripts/activate > activate_env.sh
- name: Install dependencies
shell: bash
run: |
source activate_env.sh
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build
shell: bash
run: |
source activate_env.sh
pyinstaller -F -w main.py --name GramBotMetadataEditor
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: GramBotMetadataEditor
path: dist/GramBotMetadataEditor.exe
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/GramBotMetadataEditor.exe
asset_name: GramBotMetadataEditor.exe
tag: ${{ github.ref }}
overwrite: true