Skip to content

Merge pull request #825 from microsoftgraph/release-please--branches-… #46

Merge pull request #825 from microsoftgraph/release-please--branches-…

Merge pull request #825 from microsoftgraph/release-please--branches-… #46

Workflow file for this run

name: Publish package to PyPI and create release
on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
uses: ./.github/workflows/build.yml
publish:
name: Publish distribution to PyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
environment: pypi_prod
needs: [build]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}