Skip to content

Commit c27a8bd

Browse files
authored
Update publish.yml
1 parent d12cb8e commit c27a8bd

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

.github/workflows/publish.yml

+17-15
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,32 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11-
environment: pypi
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/project/langchain-permit
1214
permissions:
1315
id-token: write # REQUIRED for trusted publishing
14-
contents: read
1516
steps:
16-
- uses: actions/checkout@v3
17+
- name: Checkout code
18+
- uses: actions/checkout@v4
19+
1720
- name: Set up Python
18-
uses: actions/setup-python@v3
21+
uses: actions/setup-python@v5
1922
with:
2023
python-version: "3.13"
21-
- name: Request OIDC Token
22-
run: |
23-
curl -X POST \
24-
-H "Authorization: Bearer $(curl -X POST -H \"Authorization: token ${{ secrets.GITHUB_TOKEN }}\" \
25-
https://api.github.com/app/installations/YOUR_INSTALLATION_ID/access_tokens | jq -r .token)" \
26-
https://pypi.org/_/oidc/token
24+
2725
- name: Install Poetry
2826
run: |
2927
curl -sSL https://install.python-poetry.org | python3 -
30-
- name: Configure Poetry
31-
run: poetry config pypi-token.pypi ""
3228
33-
- name: Build package
29+
- name: Update Poetry configuration
30+
run: poetry config virtualenvs.create false
31+
32+
- name: Install dependencies
33+
run: poetry install --sync --no-interaction
34+
35+
- name: Package project
3436
run: poetry build
3537

36-
- name: Publish to PyPI
37-
run: poetry publish
38+
- name: Publish package distributions to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)