Skip to content

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

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

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

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.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- 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@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}