Debian Codegraph @

.github/workflows/release.yml

raw
1 ---
2 name: Release
3
4 # yamllint disable-line rule:truthy
5 on:
6 release:
7 types:
8 - published
9
10 env:
11 DEFAULT_PYTHON: "3.11"
12
13 jobs:
14 release:
15 name: Releasing to PyPi
16 runs-on: ubuntu-latest
17 environment:
18 name: release
19 url: https://pypi.org/p/aiotankerkoenig
20 permissions:
21 contents: write
22 id-token: write
23 steps:
24 - name: โคต๏ธ Check out code from GitHub
25 uses: actions/[email protected]
26 - name: ๐Ÿ— Set up uv
27 uses: astral-sh/[email protected]
28 - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }}
29 id: python
30 uses: actions/[email protected]
31 with:
32 python-version: ${{ env.DEFAULT_PYTHON }}
33 - name: ๐Ÿ— Install dependencies
34 run: uv sync
35 - name: ๐Ÿ— Set package version
36 run: |
37 version="${{ github.event.release.tag_name }}"
38 version="${version,,}"
39 version="${version#v}"
40 sed -i '0,/^version = /s/^version = .*/version = "'"${version}"'"/' pyproject.toml
41 - name: ๐Ÿ— Build package
42 run: uv build
43 - name: ๐Ÿš€ Publish to PyPi
44 uses: pypa/[email protected]
45 with:
46 verbose: true
47 print-hash: true
48 - name: โœ๏ธ Sign published artifacts
49 uses: sigstore/[email protected]
50 with:
51 inputs: ./dist/*.tar.gz ./dist/*.whl
52 release-signing-artifacts: true