Skip to content

Commit 1b56b3a

Browse files
Merge pull request #49 from kevinbackhouse/environment
Try to get the environment syntax correct
2 parents 9939558 + 5f75e92 commit 1b56b3a

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/publish-reusable.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ on:
1515
description: 'This is the repository-url parameter for pypa/gh-action-pypi-publish'
1616
required: true
1717
type: string
18-
environment:
19-
description: 'PyPI/TestPyPI name and url are required'
20-
type: environment
18+
environment_name:
19+
description: 'Name of environment that specifies PyPI/TestPyPI url'
20+
type: string
2121
required: true
2222
secrets:
2323
GH_TOKEN:
@@ -31,14 +31,16 @@ jobs:
3131
publish:
3232
name: Build
3333
runs-on: ubuntu-latest
34-
environment: ${{ inputs.environment }}
34+
environment: ${{ inputs.environment_name }}
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
3737
GITHUB_REPO: ${{ github.repository }}
3838

3939
steps:
4040
- name: Checkout repository
4141
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
42+
with:
43+
persist-credentials: false
4244

4345
- name: Set up Python
4446
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0

.github/workflows/publish-to-testpypi.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
jobs:
1111
publish:
1212
name: Publish wheel to TestPyPI
13+
environment:
14+
name: testpypi
15+
url: https://test.pypi.org/p/seclab-taskflow-agent2
1316
permissions:
1417
contents: write
1518
id-token: write # For trusted publishing
@@ -18,8 +21,6 @@ jobs:
1821
version: ${{ inputs.version }}
1922
release_notes: ${{ github.head_ref }}
2023
repository_url: https://test.pypi.org/legacy/
21-
environment:
22-
name: testpypi
23-
url: https://test.pypi.org/p/seclab-taskflow-agent2
24+
environment: testpypi
2425
secrets:
2526
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)