Skip to content

Commit 431f098

Browse files
committed
Update workflow to use PyPI Trusted Publisher framework (2nd try)
References: * https://docs.pypi.org/trusted-publishers/using-a-publisher/ Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent 04f35a8 commit 431f098

File tree

2 files changed

+31
-11
lines changed

2 files changed

+31
-11
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,3 @@ jobs:
5757
- name: Build Package
5858
run: |
5959
poetry build
60-
61-
pypi-publish:
62-
needs: build
63-
environment: release
64-
permissions:
65-
# IMPORTANT: this permission is mandatory for trusted publishing
66-
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
67-
id-token: write
68-
steps:
69-
- name: Push to PyPi
70-
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
jobs:
21+
pypi-publish:
22+
name: Upload release to PyPI
23+
runs-on: ubuntu-latest
24+
environment: release
25+
permissions:
26+
# IMPORTANT: this permission is mandatory for trusted publishing
27+
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
28+
id-token: write
29+
steps:
30+
- name: Push to PyPi
31+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)