Skip to content

Commit a7b9319

Browse files
authored
feat: simplify publishing to PyPI from GitHub Actions (#300)
1 parent f48d001 commit a7b9319

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

template/docker-compose.yml.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
devcontainer:
44
build:
55
target: dev
6-
{%- if project_type == 'package' %}
6+
{%- if project_type == 'package' and ci != 'github' %}
77
environment:
88
- UV_PUBLISH_TOKEN
99
{%- endif %}

template/{% if ci == 'github' %}.github{% endif %}/workflows/{% if project_type == 'package' %}publish.yml{% endif %}.jinja

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ on:
77

88
jobs:
99
publish:
10-
runs-on: ghcr.io/astral-sh/uv:{{ python_version }}-bookworm
10+
runs-on: ubuntu-latest
1111

1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v5
18+
1619
- name: Publish package
1720
run: |
1821
uv build
1922
uv publish
20-
env:
21-
UV_PUBLISH_TOKEN: {% raw %}${{ secrets.UV_PUBLISH_TOKEN }}{% endraw %}

0 commit comments

Comments
 (0)