Skip to content

πŸ‘· ci: improve publish #3

πŸ‘· ci: improve publish

πŸ‘· ci: improve publish #3

Workflow file for this run

name: Upload Python Package
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
target-version: [py38, 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
permissions:
id-token: write
steps:
- 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@v1
with:
name: "PyFuture Release ${{ github.ref }}"
files: |
dist/*