Skip to content

Commit f27d232

Browse files
Add release pipeline (#75)
1 parent d6a24c7 commit f27d232

File tree

2 files changed

+39
-10
lines changed

2 files changed

+39
-10
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
name: CI
22
on:
3-
workflow_dispatch:
4-
push:
5-
branches: ['main']
6-
pull_request:
3+
workflow_dispatch:
4+
push:
5+
branches: ['main']
6+
pull_request:
77
jobs:
88
tests:
99
runs-on: ${{ matrix.os }}
1010
env:
1111
PYTHONIOENCODING: utf-8
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1515

1616
- name: Setup git user config
1717
run: |
1818
git config --global user.name placeholder
1919
git config --global user.email placeholder@example.com
2020
21-
- name: "Set up uv"
22-
uses: astral-sh/setup-uv@f3bcaebff5eace81a1c062af9f9011aae482ca9d # v3.1.7
21+
- name: Set up uv
22+
uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
2323
with:
2424
version: "latest"
2525

2626
- name: "Set up Python"
27-
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
27+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030

@@ -39,8 +39,7 @@ jobs:
3939
4040
- name: Run pytest
4141
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507 # v2.2.0
42-
with:
43-
custom-arguments: tests
42+
4443
strategy:
4544
matrix:
4645
os: [ubuntu-latest, macos-latest, windows-latest]

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
name: Release to PyPI
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
environment: release
11+
permissions:
12+
id-token: write
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- name: Set up uv
18+
uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
19+
with:
20+
version: "latest"
21+
22+
- name: "Set up Python"
23+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
24+
with:
25+
python-version: 3.12
26+
27+
- name: Release
28+
run: |
29+
uv build
30+
uv publish --trusted-publishing always

0 commit comments

Comments
 (0)