diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a2e7ef..9281610 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -57,10 +57,3 @@ jobs: - name: Build Package run: | poetry build - - # Only push to PyPi when a tag is created starting with 'v' - - name: Push to PyPi - if: startsWith(github.ref, 'refs/tags/v') - run: | - poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} - poetry publish diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..6d1d1b7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +# Portions of this file contributed by NIST are governed by the +# following statement: +# +# This software was developed at the National Institute of Standards +# and Technology by employees of the Federal Government in the course +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. +# +# We would appreciate acknowledgement if the software is used. + +# This file was started from template code from: +# https://docs.pypi.org/trusted-publishers/using-a-publisher/ + +name: Publish + +on: + release: + types: [released] + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: release + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + # https://docs.pypi.org/trusted-publishers/using-a-publisher/ + id-token: write + steps: + - name: Push to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 3e80eab..c540589 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,8 @@ name = "case-mapping" version = "0.1.0" description = "Classes to support representation of the CASE Cyber Ontology" authors = [ +] +maintainers = [ "Cyber Domain Ontology Maintainers " ] license = "Apache-2.0"