Skip to content

Commit ec2cf41

Browse files
xaduprejustinchuby
andauthored
Defines action to publish on pypi (#1185)
* update changelogs Signed-off-by: xadupre <xadupre@microsoft.com> * Add publish pipeline Signed-off-by: xadupre <xadupre@microsoft.com> * change Signed-off-by: xadupre <xadupre@microsoft.com> * Update .github/workflows/release.yml Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Signed-off-by: Xavier Dupré <xadupre@users.noreply.github.com> --------- Signed-off-by: xadupre <xadupre@microsoft.com> Signed-off-by: Xavier Dupré <xadupre@users.noreply.github.com> Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
1 parent c14d432 commit ec2cf41

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
deploy:
20+
21+
runs-on: ubuntu-latest
22+
environment: release
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.x'
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install build
34+
35+
- name: Build package
36+
run: python -m build
37+
38+
- name: Publish package
39+
uses: pypa/gh-action-pypi-publish@v1
40+
with:
41+
attestations: true

0 commit comments

Comments
 (0)