-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.1 KB
/
Copy pathrelease-python.yml
File metadata and controls
46 lines (39 loc) · 1.1 KB
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
name: Release Python SDK
on:
push:
tags:
- 'py-v*'
workflow_dispatch:
jobs:
publish:
name: Build & Publish to PyPI
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
working-directory: ./sdks/python
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install build tools
run: python -m pip install --upgrade pip build twine
- name: Build Wheel & sdist
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: sdks/python/dist/*
name: Python SDK ${{ github.ref_name }}
body: "Automated release for the dcoink Python SDK. Includes compiled wheel and source tarball."
draft: false
prerelease: false