Skip to content

Commit 48d6dfb

Browse files
authored
Merge pull request #6 from nomad-coe/release
Use pypi pkg
2 parents 22af484 + a1692c5 commit 48d6dfb

File tree

2 files changed

+14
-32
lines changed

2 files changed

+14
-32
lines changed

.github/workflows/publish.yml

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
name: upload-package
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
25

36
on:
47
release:
58
types: [published]
69

710
jobs:
8-
github-release:
11+
publish-to-pypi:
912
name: >-
10-
Sign the Python distribution with Sigstore
11-
and upload them to GitHub Release
13+
Publish distribution to PyPI
1214
runs-on: ubuntu-latest
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/p/nomad-normalizer-plugin-simulation-workflow
1318
permissions:
14-
contents: write # IMPORTANT: mandatory for making GitHub Releases
15-
id-token: write # IMPORTANT: mandatory for sigstore
16-
19+
id-token: write # IMPORTANT: mandatory for trusted publishing
20+
1721
steps:
1822
- uses: actions/checkout@v4
1923
- name: Set up Python
@@ -28,27 +32,5 @@ jobs:
2832
--user
2933
- name: Build a binary wheel and a source tarball
3034
run: python3 -m build
31-
- name: Sign the dists with Sigstore
32-
uses: sigstore/[email protected]
33-
with:
34-
inputs: >-
35-
./dist/*.tar.gz
36-
./dist/*.whl
37-
- name: Create GitHub Release
38-
env:
39-
GITHUB_TOKEN: ${{ github.token }}
40-
run: >-
41-
gh release create
42-
'${{ github.ref_name }}'
43-
--repo '${{ github.repository }}'
44-
--notes ""
45-
- name: Upload artifact signatures to GitHub Release
46-
env:
47-
GITHUB_TOKEN: ${{ github.token }}
48-
# Upload to GitHub Release using the `gh` CLI.
49-
# `dist/` contains the built packages, and the
50-
# sigstore-produced signatures and certificates.
51-
run: >-
52-
gh release upload
53-
'${{ github.ref_name }}' dist/**
54-
--repo '${{ github.repository }}'
35+
- name: Publish distribution to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors = [{ name = "The NOMAD Authors" }]
1111
license = { text = "Apache-2.0" }
1212
dependencies = [
1313
"nomad-lab>=1.2.0",
14-
"nomad-schema-plugin-simulation-workflow@git+https://github.com/nomad-coe/nomad-schema-plugin-simulation-workflow.git@develop",
14+
"nomad-schema-plugin-simulation-workflow>=1.0.1",
1515
]
1616

1717
[project.urls]

0 commit comments

Comments
 (0)