Skip to content

Commit 5359014

Browse files
authored
Merge pull request #18 from wwarne/add-publish-workflow
Add publish workflow
2 parents 53b05fe + bee0583 commit 5359014

File tree

4 files changed

+176
-105
lines changed

4 files changed

+176
-105
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This workflow will upload a Python Package to PyPI when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
release-build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Install uv and set the python version
26+
uses: astral-sh/setup-uv@v5
27+
with:
28+
# Install a specific version of uv.
29+
version: "0.7.3"
30+
python-version: 3.12
31+
32+
- name: Build release distributions
33+
run: |
34+
uv build
35+
36+
- name: Upload distributions
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: release-dists
40+
path: dist/
41+
42+
pypi-publish:
43+
runs-on: ubuntu-latest
44+
needs:
45+
- release-build
46+
permissions:
47+
# IMPORTANT: this permission is mandatory for trusted publishing
48+
id-token: write
49+
50+
# Dedicated environments with protections for publishing are strongly recommended.
51+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
52+
environment:
53+
name: pypi
54+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
55+
url: https://pypi.org/project/dogpile-breaker/
56+
#
57+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
58+
# ALTERNATIVE: exactly, uncomment the following line instead:
59+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
60+
61+
steps:
62+
- name: Retrieve release distributions
63+
uses: actions/download-artifact@v4
64+
with:
65+
name: release-dists
66+
path: dist/
67+
68+
- name: Publish release distributions to PyPI
69+
uses: pypa/gh-action-pypi-publish@release/v1
70+
with:
71+
packages-dir: dist/

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "dogpile_breaker"
3-
version = "0.10.1"
3+
version = "0.11.0"
44
description = "Cache for Asyncio Applications with Anti-Dogpile Effect"
55
readme = "README.md"
66
authors = [

src/dogpile_breaker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.10.1"
1+
__version__ = "0.11.0"
22

33
from .api import CacheRegion, ShouldCacheFunc, StorageBackend
44
from .backends.memory_backend import MemoryBackendLRU

0 commit comments

Comments
 (0)