-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from ikrommyd/ci-publish-to-pypi
ci: add publishing to pypi
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,6 +91,40 @@ jobs: | |
run: | | ||
pytest tests | ||
release: | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
needs: test | ||
permissions: | ||
id-token: write | ||
attestations: write | ||
contents: read | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
name: deploy release | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build package for PyPI | ||
run: | | ||
pipx run hatch build -t sdist -t wheel | ||
- name: Verify the distribution | ||
run: pipx run twine check --strict dist/* | ||
- name: Generate artifact attestation for sdist and wheel | ||
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3 | ||
with: | ||
subject-path: "dist/egamma_tnp-*" | ||
- name: Publish package to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
pass: | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# egamma-tnp | ||
E/Gamma High Level Trigger efficiency from NanoAOD using Tag and Probe in the [coffea](https://github.com/CoffeaTeam/coffea) framework. | ||
|
||
[![ci](https://github.com/ikrommyd/egamma-tnp/actions/workflows/ci.yml/badge.svg)](https://github.com/ikrommyd/egamma-tnp/actions?query=workflow%3ACI%2FCD+event%3Aschedule+branch%3Amaster) | ||
[![PyPI Version](https://badge.fury.io/py/egamma-tnp.svg)](https://badge.fury.io/py/egamma-tnp) | ||
|
||
E/Gamma Tag % Probe framework using [coffea](https://github.com/CoffeaTeam/coffea). |