diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a31bfa5 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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/nomad-parser-plugins-workflow + 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 diff --git a/pyproject.toml b/pyproject.toml index fbaca4e..aa4b2d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [project] -name = "workflowparsers" +name = "nomad-parser-plugins-workflow" version = "1.0" description = "Collection of NOMAD parsers for workflow engines." readme = "README.md" @@ -11,8 +11,8 @@ authors = [{ name = "The NOMAD Authors" }] license = { file = "LICENSE" } dependencies = [ "nomad-lab>=1.3.6.dev1", - "nomad-schema-plugin-simulation-workflow@git+https://github.com/nomad-coe/nomad-schema-plugin-simulation-workflow.git@develop", - "nomad-schema-plugin-run@git+https://github.com/nomad-coe/nomad-schema-plugin-run.git@develop", + "nomad-schema-plugin-simulation-workflow>=1.0.1", + "nomad-schema-plugin-run>=1.0.1", "lxml>=5.2", "asr==0.4.1", "xarray>=0.20.1",