Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

build: 更新版本号 #246

build: 更新版本号

build: 更新版本号 #246

Workflow file for this run

name: Build (v2)
on:
workflow_dispatch:
push:
paths:
- 'mys_goods_tool/**'
- '.github/workflows/build-v2.yml'
- '__init__.py'
- 'Mys_Goods_Tool.spec'
- 'pyproject.toml'
pull_request:
paths:
- 'mys_goods_tool/**'
- '.github/workflows/build-v2.yml'
- '__init__.py'
- 'Mys_Goods_Tool.spec'
- 'pyproject.toml'
permissions:
contents: read
env:
# Initialize vars context by reading it from env context
_: ${{ vars._ }}
windows-poetry-path: C:\Users\runneradmin\AppData\Roaming\Python\Scripts\poetry
spec-file-path: Mys_Goods_Tool.spec
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-20.04, macOS-latest ]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install --with pyinstaller,uvloop
- name: Install dependencies (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="/Users/runner/.local/bin:$PATH"
poetry install --with pyinstaller,uvloop
- name: Install dependencies (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
${{ env.windows-poetry-path }} install --with pyinstaller
- name: Build (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
poetry run pyinstaller ${{ env.spec-file-path }}
- name: Build (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
export PATH="/Users/runner/.local/bin:$PATH"
poetry run pyinstaller ${{ env.spec-file-path }}
- name: Build (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
${{ env.windows-poetry-path }} run pyinstaller ${{ env.spec-file-path }}
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: Mys_Goods_Tool_v2-${{ runner.os }}-x86_64
path: |
dist/${{ env.executable-file-name }}*
README.md