Skip to content

Commit

Permalink
Fix PyPI pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
ElieTaillard committed Apr 25, 2024
1 parent dde35fc commit e478669
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

name: Publish Python Package

on:
workflow_call:
secrets:
PYPI_API_TOKEN:
required: true

permissions:
contents: read
id-token: write

jobs:
build-and-pypi-publish:

runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ikabot

steps:
- uses: actions/checkout@v3
Expand All @@ -32,7 +33,7 @@ jobs:
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.8
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/publish_pypi_manually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: Publish PyPI package Manually
on:
workflow_dispatch:

permissions:
contents: read

jobs:
publish_pypi:
name: Publish PyPI package
uses: ./.github/workflows/publish_pypi.yml
uses: ./.github/workflows/publish_pypi.yml
secrets:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,5 @@ jobs:
needs: [publish_release]
name: Publish Python Package
uses: ./.github/workflows/publish_pypi.yml
secrets:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit e478669

Please sign in to comment.