| 1 |
# This workflows will upload a Python Package using Twine when a release is created |
| 2 |
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries |
| 3 |
|
| 4 |
name: release |
| 5 |
permissions: |
| 6 |
checks: write |
| 7 |
pull-requests: write |
| 8 |
packages: write |
| 9 |
deployments: write |
| 10 |
contents: write |
| 11 |
id-token: write |
| 12 |
|
| 13 |
on: |
| 14 |
push: |
| 15 |
tags: |
| 16 |
- "v[0-9]+.[0-9]+.[0-9]+" |
| 17 |
|
| 18 |
jobs: |
| 19 |
deploy: |
| 20 |
runs-on: ubuntu-latest |
| 21 |
environment: release |
| 22 |
steps: |
| 23 |
- uses: actions/checkout@v4 |
| 24 |
- name: Set up Python |
| 25 |
uses: actions/setup-python@v5 |
| 26 |
with: |
| 27 |
python-version: '3.8' |
| 28 |
- name: Install dependencies |
| 29 |
run: | |
| 30 |
python -m pip install --upgrade pip |
| 31 |
pip install setuptools wheel twine |
| 32 |
- name: Build azure-kusto-data |
| 33 |
working-directory: ./azure-kusto-data |
| 34 |
run: | |
| 35 |
python setup.py sdist bdist_wheel |
| 36 |
- name: Build azure-kusto-ingest |
| 37 |
working-directory: ./azure-kusto-ingest |
| 38 |
run: | |
| 39 |
python setup.py sdist bdist_wheel |
| 40 |
- name: Publish azure-kusto-data |
| 41 |
uses: pypa/gh-action-pypi-publish@release/v1 |
| 42 |
with: |
| 43 |
packages-dir: azure-kusto-data/dist |
| 44 |
- name: Publish azure-kusto-ingest |
| 45 |
uses: pypa/gh-action-pypi-publish@release/v1 |
| 46 |
with: |
| 47 |
packages-dir: azure-kusto-ingest/dist |
| 48 |
- name: Release |
| 49 |
uses: docker://antonyurchenko/git-release:latest |
| 50 |
env: |
| 51 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 52 |
with: |
| 53 |
args: azure-kusto-data/dist/*.tar.gz azure-kusto-ingest/dist/*.tar.gz azure-kusto-data/dist/*.whl azure-kusto-ingest/dist/*.whl |