Skip to content

Commit 3839328

Browse files
committed
Creating of pipeline to publish dts python package to pypi
Signed-off-by: Ryan Lettieri <[email protected]>
1 parent 151308a commit 3839328

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Durable Task Scheduler to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Only run for tags starting with "v"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Extract version from tag
17+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV # Extract version from the tag
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12" # Adjust Python version as needed
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install build twine
28+
29+
- name: Build package from directory durabletask-azuremanaged
30+
run: |
31+
cd durabletask-azuremanaged
32+
python -m build
33+
34+
- name: Check package
35+
run: |
36+
cd durabletask-azuremanaged
37+
twine check dist/*
38+
39+
- name: Publish package to PyPI
40+
env:
41+
TWINE_USERNAME: __token__
42+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # Store your PyPI API token in GitHub Secrets
43+
run: |
44+
cd durabletask-azuremanaged
45+
twine upload dist/*

0 commit comments

Comments
 (0)