Update workflows

This commit is contained in:
2023-03-27 11:23:30 +02:00
parent 6ee8c7fe75
commit 2553d84d91
4 changed files with 38 additions and 11 deletions

View File

@@ -8,26 +8,35 @@ on:
permissions:
contents: write
env:
PYTHON_VERSION: "3.11"
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
uses: ./.github/workflows/test.yml
with:
python-version: $PYTHON_VERSION
os: ${{ matrix.os }}
build:
runs-on: windows-latest
needs: test
steps:
- uses: actions/checkout@v3
name: Checkout
- uses: actions/setup-python@v4
name: Setup Python
with:
python-version: "3.11"
python-version: $PYTHON_VERSION
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install .[build]
- name: Build
run: pyinstaller dyn2py.spec
- uses: actions/upload-artifact@v3
name: Upload artifact
with:
@@ -55,4 +64,23 @@ jobs:
files: dyn2py.exe
body: ${{ steps.modified.outputs.log }}
# TODO: pip
pip:
runs-on: ubuntu-latest
needs: release
steps:
- uses: actions/checkout@v3
name: Checkout
- uses: actions/setup-python@v4
name: Setup Python
with:
python-version: $PYTHON_VERSION
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@@ -9,7 +9,7 @@ on:
type: string
jobs:
reusable_workflow_job:
test:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3