Skip to content

Commit

Permalink
ci: trusted pub (#436)
Browse files Browse the repository at this point in the history
* ci: trusted pub

* Update wheel.yml

* Update wheel.yml

* Update wheel.yml

* style: pre-commit fixes

* Update wheel.yml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
henryiii and pre-commit-ci[bot] authored Apr 30, 2024
1 parent cb0a861 commit c3fe47f
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,33 @@ on:
push:
branches:
- master
pull_request:
release:
types:
- published
- published

jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build wheel and SDist
run: pipx run build

- name: Check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v4
with:
path: dist/*
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: hynek/build-and-inspect-python-package@v2

publish:
needs: [dist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment: pypi
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
- uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit c3fe47f

Please sign in to comment.