Skip to content

Commit 55799bc

Browse files
Use trusted publisher (#78)
1 parent 0140168 commit 55799bc

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build Wheel and Release
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
7+
jobs:
8+
pypi-publish:
9+
name: upload release to PyPI
10+
runs-on: ubuntu-latest
11+
# Specifying a GitHub environment is optional, but strongly encouraged
12+
environment: release
13+
permissions:
14+
# IMPORTANT: this permission is mandatory for trusted publishing
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- uses: actions/setup-python@v4
22+
name: Install Python
23+
with:
24+
python-version: "3.11"
25+
26+
- name: Build wheels
27+
run: |
28+
git clean -fxd
29+
pip install -U build twine wheel
30+
python -m build --sdist --wheel
31+
32+
- name: Publish package distributions to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1

RELEASE.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ Example `version number`
4646
where `origin` is the name of the `github.com:scientific-python/lazy_loader`
4747
repository
4848

49-
- Review the github release page:
50-
51-
https://github.com/scientific-python/lazy_loader/tags
52-
53-
- Publish on PyPi:
54-
55-
git clean -fxd
56-
pip install -U build twine wheel
57-
python -m build --sdist --wheel
58-
twine upload -s dist/*
59-
6049
- Update `version` in `pyproject.toml`.
6150

6251
- Commit changes:

0 commit comments

Comments
 (0)