Skip to content

Commit ddbcfa4

Browse files
committed
Add trusted publishing
1 parent 57ee6fe commit ddbcfa4

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
defaults:
8+
run:
9+
# to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
10+
shell: bash -euo pipefail {0}
11+
12+
# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
13+
jobs:
14+
release:
15+
name: Upload release to PyPI
16+
runs-on: ubuntu-latest
17+
environment:
18+
name: pypi
19+
url: https://pypi.org/p/mudata
20+
permissions:
21+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
filter: blob:none
26+
fetch-depth: 0
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v5
29+
with:
30+
cache-dependency-glob: pyproject.toml
31+
- name: Build package
32+
run: uv build
33+
- name: Publish package distributions to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)