Skip to content

Commit

Permalink
Merge pull request #5 from blueraft/publish-package
Browse files Browse the repository at this point in the history
Publish action
  • Loading branch information
ladinesa authored Sep 11, 2024
2 parents bf69fd3 + 13b42ba commit 6ce41cf
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Upload python package to pypi server and github release.
# Reference: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

name: Upload Python Package

on:
release:
types: [published]

jobs:
publish-to-pypi:
name: >-
Publish distribution to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/simulationparsers
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = [{ name = "The NOMAD Authors" }]
license = { file = "LICENSE" }
dependencies = [
"nomad-lab>=1.2.0",
"nomad-schema-plugin-run@git+https://github.com/nomad-coe/nomad-schema-plugin-run.git@develop",
"nomad-schema-plugin-run>=1.0.1",
]

[project.urls]
Expand Down

0 comments on commit 6ce41cf

Please sign in to comment.