-
Notifications
You must be signed in to change notification settings - Fork 45
55 lines (45 loc) · 1.34 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
name: Release and publish
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy==2.0.1 cython wheel packaging setuptools setuptools_scm
pip install -r requirements.txt
pip install -e .[tests]
- name: Test
run: pytest
- name: Build packages
run: |
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
- name: Write release info
run: |
awk 'BEGIN {p = 0}; { a = 0 }; /## v./ { p += 1; a = 1}; p + a == 1 { print } ' docs/src/changelog.md > release_info.txt
- name: Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: release_info.txt
draft: false
prerelease: false