-
Notifications
You must be signed in to change notification settings - Fork 14
38 lines (36 loc) · 970 Bytes
/
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
name: publish
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Twine check
run: twine check dist/*
- name: Get changelog for release
id: changelog
uses: mindsers/changelog-reader-action@v2
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
body: ${{ steps.changelog.outputs.changes }}
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}