mirror of
https://github.com/PaiGramTeam/PaiGramMetadata.git
synced 2024-11-22 06:57:48 +00:00
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '**.json'
|
|
- 'gcsim/**'
|
|
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
|