mirror of
https://github.com/infeeeee/dyn2py
synced 2025-12-16 22:16:18 +01:00
87 lines
2.0 KiB
YAML
87 lines
2.0 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
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: $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:
|
|
name: dyn2py.exe
|
|
path: dist/dyn2py.exe
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
name: Checkout
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: metcalfc/changelog-generator@v4.1.0
|
|
with:
|
|
myToken: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: dyn2py.exe
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: dyn2py.exe
|
|
body: ${{ steps.modified.outputs.log }}
|
|
|
|
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 }}
|