-
Notifications
You must be signed in to change notification settings - Fork 14
52 lines (52 loc) · 1.59 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (52 loc) · 1.59 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
name: Publish to Pypi and create Github release
on:
push:
tags:
- "v*.*.*"
jobs:
pypi:
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.18"
- name: Install Python 3.10
run: uv python install 3.10
- name: Build
run: uv build
# TODO: smoke tests
- name: Publish
run: uv publish
github-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Get version from tag
id: tag_name
run: |
echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
- name: Checkout code
uses: actions/checkout@v6
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
- name: Create/update release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.changelog_reader.outputs.version }}
name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}