-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (61 loc) · 1.52 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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/*