Skip to content

Commit

Permalink
Merge pull request #67 from casework/release-0.1.0
Browse files Browse the repository at this point in the history
Release 0.1.0: Update metadata and add Trusted Publisher workflow
  • Loading branch information
kchason authored Jul 30, 2024
2 parents c1a8152 + 3be5877 commit cd5c856
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"
]
license = "Apache-2.0"
Expand Down

0 comments on commit cd5c856

Please sign in to comment.