-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.38 KB
/
release.yml
File metadata and controls
56 lines (48 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Release
on:
push:
tags:
- 'v*.*.*'
env:
FORCE_COLOR: 1
UV_LOCKED: 1
jobs:
tests:
name: Tests
uses: ./.github/workflows/tests.yml
lint:
name: Lint
uses: ./.github/workflows/lint-and-type-check.yml
release:
needs: [tests, lint]
name: Release
environment:
name: pypi
url: https://pypi.org/project/privatebin/
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Important for changelog
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.13"
- name: Build
run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
- name: Generate a changelog
run: >-
uvx git-cliff --config github
--github-repo ${{ github.repository }}
--github-token ${{ github.token }}
--latest --strip all --output "CHANGELOG.md"
- name: Create Release
run: gh release create ${{ github.ref_name }} -F "CHANGELOG.md" --fail-on-no-commits
env:
GH_TOKEN: ${{ github.token }}