Skip to content

Commit df2692a

Browse files
committed
add publish workflow
1 parent 0162287 commit df2692a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SPDX-FileCopyrightText: 2021-2022 Constantine Evans <const@costi.eu>
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
# This workflow will upload a Python Package using Twine when a release is created
6+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
7+
8+
# This workflow uses actions that are not certified by GitHub.
9+
# They are provided by a third-party and are governed by
10+
# separate terms of service, privacy policy, and support
11+
# documentation.
12+
13+
name: Upload Python Package
14+
15+
on:
16+
release:
17+
types: [published]
18+
19+
jobs:
20+
deploy:
21+
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Set up Python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: '3.9'
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install build
34+
- name: Build package
35+
run: python -m build
36+
- name: Publish package
37+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
38+
with:
39+
user: __token__
40+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)