Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Enable publishing with PyPI trusted publishers #368

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ on:

jobs:
publish-release:
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -18,11 +22,11 @@ jobs:
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --no-root --no-dev
- name: publish
- name: build
shell: bash
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build --no-interaction
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
build-docs:
permissions:
contents: write
Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Creating a new release
4. In GitHub go to the `releases tab <https://github.com/litestar-org/polyfactory/releases>`_
5. Pick "`Draft a new release <https://github.com/litestar-org/polyfactory/releases/new>`_"
6. Give it a title and a tag, both ``vX.X.X``
7. Fill in the release description, you can let GitHub do it for you and then edit as needed.
7. Fill in the release description. You can let GitHub do it for you and then edit as needed.
8. Publish the release.
9. Look under the action pane and make sure the release action runs correctly
9. Go to `Actions <https://github.com/litestar-org/polyfactory/actions>`_ and approve the workflow
10. Check that the workflow runs successfully
Loading