-
Notifications
You must be signed in to change notification settings - Fork 32
57 lines (48 loc) · 1.5 KB
/
python-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
name: Publish picframe to PyPI / GitHub
on:
push:
tags:
- "2*"
jobs:
build-n-publish:
name: Build and publish to PyPi
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/picframe
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Build source and wheel distributions
run: |
python -m pip install --upgrade pip build twine
python -m build
twine check --strict dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Build Changelog
id: github_release
uses: mikepenz/[email protected]
with:
failOnError: true
commitMode: true
configuration: ".github/workflows/config/release-notes-config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
body: ${{steps.github_release.outputs.changelog}}
draft: false
files: |
dist/picframe-*.tar.gz, dist/picframe-*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}