Skip to content

Commit cd5c856

Browse files
authored
Merge pull request #67 from casework/release-0.1.0
Release 0.1.0: Update metadata and add Trusted Publisher workflow
2 parents c1a8152 + 3be5877 commit cd5c856

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- name: Checkout Repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

@@ -57,10 +57,3 @@ jobs:
5757
- name: Build Package
5858
run: |
5959
poetry build
60-
61-
# Only push to PyPi when a tag is created starting with 'v'
62-
- name: Push to PyPi
63-
if: startsWith(github.ref, 'refs/tags/v')
64-
run: |
65-
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
66-
poetry publish

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Portions of this file contributed by NIST are governed by the
2+
# following statement:
3+
#
4+
# This software was developed at the National Institute of Standards
5+
# and Technology by employees of the Federal Government in the course
6+
# of their official duties. Pursuant to Title 17 Section 105 of the
7+
# United States Code, this software is not subject to copyright
8+
# protection within the United States. NIST assumes no responsibility
9+
# whatsoever for its use by other parties, and makes no guarantees,
10+
# expressed or implied, about its quality, reliability, or any other
11+
# characteristic.
12+
#
13+
# We would appreciate acknowledgement if the software is used.
14+
15+
# This file was started from template code from:
16+
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
17+
18+
name: Publish
19+
20+
on:
21+
release:
22+
types: [released]
23+
24+
jobs:
25+
pypi-publish:
26+
name: Upload release to PyPI
27+
runs-on: ubuntu-latest
28+
environment: release
29+
permissions:
30+
# IMPORTANT: this permission is mandatory for trusted publishing
31+
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
32+
id-token: write
33+
steps:
34+
- name: Push to PyPi
35+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name = "case-mapping"
33
version = "0.1.0"
44
description = "Classes to support representation of the CASE Cyber Ontology"
55
authors = [
6+
]
7+
maintainers = [
68
"Cyber Domain Ontology Maintainers <operations@cyberdomainontology.org>"
79
]
810
license = "Apache-2.0"

0 commit comments

Comments
 (0)