Skip to content

Commit

Permalink
ci: switch to PyPI's trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeWatt committed Nov 14, 2023
1 parent 1434ae9 commit bfcd4fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ jobs:
needs: test
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/hepdata-validator
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
Expand All @@ -67,6 +72,3 @@ jobs:
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
HEPData Validator
==================

.. image:: https://github.com/HEPData/hepdata-validator/workflows/Continuous%20Integration/badge.svg?branch=main
.. image:: https://github.com/HEPData/hepdata-validator/actions/workflows/ci.yml/badge.svg?branch=main
:target: https://github.com/HEPData/hepdata-validator/actions?query=branch%3Amain
:alt: GitHub Actions Build Status

Expand Down

0 comments on commit bfcd4fd

Please sign in to comment.