You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: Upload Python Package to PyPI when a Release is Created
1
+
# This workflow will upload a Python Package to PyPI 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
2
10
3
11
# on:
4
12
# release:
5
-
# types: [created]
13
+
# types: [published]
14
+
6
15
on: workflow_dispatch
7
16
17
+
permissions:
18
+
contents: read
19
+
8
20
jobs:
21
+
release-build:
22
+
runs-on: ubuntu-latest
23
+
24
+
steps:
25
+
- uses: actions/checkout@v4
26
+
27
+
- uses: actions/setup-python@v5
28
+
with:
29
+
python-version: "3.x"
30
+
31
+
- name: Build release distributions
32
+
run: |
33
+
# NOTE: put your own distribution build steps here.
34
+
python -m pip install build
35
+
python -m build
36
+
37
+
- name: Upload distributions
38
+
uses: actions/upload-artifact@v4
39
+
with:
40
+
name: release-dists
41
+
path: dist/
42
+
9
43
pypi-publish:
10
-
name: Publish release to PyPI
11
44
runs-on: ubuntu-latest
45
+
needs:
46
+
- release-build
47
+
permissions:
48
+
# IMPORTANT: this permission is mandatory for trusted publishing
49
+
id-token: write
50
+
51
+
# Dedicated environments with protections for publishing are strongly recommended.
52
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
12
53
environment:
13
54
name: pypi
55
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
14
56
url: https://pypi.org/p/langchain-oci
15
-
permissions:
16
-
id-token: write
57
+
#
58
+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
59
+
# ALTERNATIVE: exactly, uncomment the following line instead:
0 commit comments