♻️ refactor: improve cli #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload Python Package | |
on: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
target-version: [py39, py310, py311, py312] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout 📦 | |
uses: actions/checkout@v3 | |
- name: Setup PDM 📦 | |
uses: pdm-project/setup-pdm@v3 | |
with: | |
python-version: "3.12" | |
- name: Build package 👷♂️ | |
env: | |
PDM_IGNORE_SCM_VERSION: ${{ github.ref_name }} | |
PYFUTURE_TARGET: ${{ matrix.target-version }} | |
run: | | |
pdm install | |
pdm build --no-isolation --no-sdist | |
- name: Upload wheels 👷♂️ | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
publish-release: | |
runs-on: ubuntu-latest | |
needs: [build] | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout 📦 | |
uses: actions/checkout@v3 | |
- name: Download wheels 👷♂️ | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
- name: Publish to PyPi 🚀 | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true | |
packages-dir: dist | |
verbose: true | |
- name: Publish GitHub Release 📝 | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: "PyFuture Release ${{ github.ref_name }}" | |
token: ${{ secrets.RELEASE_TOKEN }} | |
generate_release_notes: | |
files: | | |
dist/* |