Skip to content

Commit 7387605

Browse files
committed
Add publish yaml
1 parent ddaae75 commit 7387605

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Upload python package to pypi server and github release.
2+
# Reference: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish-to-pypi:
12+
name: >-
13+
Publish distribution to PyPI
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/p/nomad-dos-fingerprints
18+
permissions:
19+
id-token: write # IMPORTANT: mandatory for trusted publishing
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: "3.9"
27+
- name: Install pypa/build
28+
run: >-
29+
python3 -m
30+
pip install
31+
build
32+
--user
33+
- name: Build a binary wheel and a source tarball
34+
run: python3 -m build
35+
- name: Publish distribution to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)