Skip to content

Commit 23ea2e3

Browse files
committed
Use PyPI OIDC
1 parent a2aaf0f commit 23ea2e3

3 files changed

Lines changed: 13 additions & 22 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ on:
55
jobs:
66
publish:
77
runs-on: ubuntu-latest
8+
environment:
9+
name: pypi
10+
url: https://pypi.org/p/pyvista-xarray
11+
permissions:
12+
id-token: write # this permission is mandatory for trusted publishing
813
steps:
914
- uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
1017
- name: Set up Python
1118
uses: actions/setup-python@v5
1219
with:
1320
python-version: "3.12"
1421
- name: Install dependencies
1522
run: |
1623
python -m pip install --upgrade pip
17-
pip install build twine
18-
- name: Build and Publish to PyPI
19-
env:
20-
TWINE_USERNAME: __token__
21-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
22-
run: |
23-
python -m build
24-
twine upload --skip-existing dist/*
24+
pip install build
25+
- name: Build package
26+
run: python -m build
27+
- name: Publish package distributions to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,7 @@ jobs:
2626
- name: Scooby Report
2727
run: python -c "import pvxarray;print(pvxarray.Report())"
2828
- name: Run Tests
29-
run: |
30-
coverage run -m pytest -v
31-
coverage xml -o coverage.xml
32-
- name: Stash coverage
33-
uses: actions/upload-artifact@v4
34-
with:
35-
name: coverage-${{ matrix.python-version }}.xml
36-
path: coverage.xml
37-
- uses: codecov/codecov-action@v5
38-
with:
39-
token: ${{ secrets.CODECOV_TOKEN }}
40-
files: coverage.xml
41-
verbose: true
29+
run: pytest -v
4230

4331
# notebooks:
4432
# runs-on: ubuntu-latest

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# PyVista xarray
22

33
[![PyPI](https://img.shields.io/pypi/v/pyvista-xarray.svg?logo=python&logoColor=white)](https://pypi.org/project/pyvista-xarray/)
4-
[![codecov](https://codecov.io/gh/pyvista/pyvista-xarray/branch/main/graph/badge.svg?token=4BSDVV0WOG)](https://codecov.io/gh/pyvista/pyvista-xarray)
54
[![MyBinder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pyvista/pyvista-xarray/HEAD)
65

76
xarray DataArray accessors for PyVista to visualize datasets in 3D

0 commit comments

Comments
 (0)