Skip to content

Commit 3446ceb

Browse files
Merge pull request #759 from analysiscenter/fix_release
fix release
2 parents 86fe1f3 + f21252f commit 3446ceb

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.github/workflows/release-check.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
pypi:
1111

1212
runs-on: ubuntu-latest
13+
environment: release
14+
permissions:
15+
id-token: write
1316

1417
steps:
1518
- uses: actions/checkout@v3
@@ -22,12 +25,12 @@ jobs:
2225
- name: Install dependencies
2326
run: pip install --user -U pip poetry
2427

25-
- name: Build and publish
26-
env:
27-
_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
28+
- name: Build
2829
run: |
2930
poetry install
3031
poetry build
31-
poetry config repositories.testpypi https://test.pypi.org/legacy/
32-
poetry config pypi-token.testpypi $_PASSWORD
33-
poetry publish --repository testpypi
32+
33+
- name: Publish
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
with:
36+
repository-url: https://test.pypi.org/legacy/

.github/workflows/release.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
3131
pypi:
3232
runs-on: ubuntu-latest
33+
environment: release
34+
permissions:
35+
id-token: write
3336

3437
steps:
3538
- uses: actions/checkout@v3
@@ -42,11 +45,10 @@ jobs:
4245
- name: Install dependencies
4346
run: pip install --user --upgrade pip poetry
4447

45-
- name: Build and publish
46-
env:
47-
_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
48+
- name: Build
4849
run: |
4950
poetry install
5051
poetry build
51-
poetry config pypi-token.pypi $_PASSWORD
52-
poetry publish
52+
53+
- name: Publish
54+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)