-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (61 loc) · 1.71 KB
/
release.yml
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
67
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.4.0
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_pypi.txt
- name: Build dist
run: |
make clean
make build
- name: Save build output
uses: actions/upload-artifact@v4.6.0
with:
name: built-output
path: ./dist
generate_changelog:
runs-on: ubuntu-latest
name: Generate changelog for default branch
steps:
- uses: actions/checkout@v4.2.2
with:
ref: master
- name: Generate changelog
uses: charmixer/auto-changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
release_branch: master
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7.0.6
with:
base: master
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update changelog
title: Update changelog
body: Update the changelog. This PR is created automatically after a new release.
branch: update-changelog
publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Load saved build output
uses: actions/download-artifact@v4.1.8
with:
name: built-output
path: ./dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.12.4
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}