-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (55 loc) · 1.57 KB
/
Copy pathrelease.yml
File metadata and controls
66 lines (55 loc) · 1.57 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
57
58
59
60
61
62
63
64
65
66
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Ensure tag matches project version
if: github.ref_type == 'tag'
env:
TAG_NAME: ${{ github.ref_name }}
run: python scripts/check_tag_version.py
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build package distributions
run: python -m build
- name: Check package metadata
run: twine check dist/*
- name: Generate release notes
if: github.ref_type == 'tag'
env:
TAG_NAME: ${{ github.ref_name }}
OUTPUT: /tmp/release-notes.md
run: python3 scripts/build_changelog_comment.py
- name: Build llms.txt artifacts
if: github.ref_type == 'tag'
env:
OUTPUT_DIR: llms-dist
run: python3 scripts/build_llms_txt.py
- name: Create GitHub release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
files: |
dist/*
llms-dist/*
body_path: /tmp/release-notes.md
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1