Skip to content

Commit b44e9ed

Browse files
committed
update PyPI package builder GHA
1 parent 6b38cd6 commit b44e9ed

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

.github/workflows/action-pypi-build-and-deploy.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,27 @@ on:
66
# use this for testing
77
push:
88
branches:
9-
- master
9+
- main
10+
- modernize_package
1011

1112
jobs:
1213
build-n-publish:
1314
name: Build and publish ESMValTool_sample_data on PyPi
1415
runs-on: ubuntu-latest
16+
environment:
17+
name: pypi
18+
url: https://pypi.org/project/ESMValTool_sample_data/
19+
permissions:
20+
# IMPORTANT: this permission is mandatory for trusted publishing
21+
id-token: write
1522
steps:
16-
- uses: actions/checkout@master
17-
- name: Set up Python 3.9
18-
uses: actions/setup-python@v1
23+
- uses: actions/checkout@v4
1924
with:
20-
python-version: 3.9
25+
fetch-depth: 0
26+
- name: Set up Python 3.13
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: "3.13"
2130
- name: Install pep517
2231
run: >-
2332
python -m
@@ -32,13 +41,10 @@ jobs:
3241
--binary
3342
--out-dir dist/
3443
.
35-
# - name: Publish distribution 📦 to Test PyPI
36-
# uses: pypa/gh-action-pypi-publish@master
44+
# - name: Publish distribution to Test PyPI
45+
# uses: pypa/gh-action-pypi-publish@release/v1
3746
# with:
38-
# password: ${{ secrets.test_pypi_password }}
39-
# repository_url: https://test.pypi.org/legacy/
47+
# repository-url: https://test.pypi.org/legacy/
4048
- name: Publish distribution 📦 to PyPI
4149
if: startsWith(github.ref, 'refs/tags')
42-
uses: pypa/gh-action-pypi-publish@master
43-
with:
44-
password: ${{ secrets.pypi_password }}
50+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)