-
Notifications
You must be signed in to change notification settings - Fork 9
39 lines (37 loc) · 940 Bytes
/
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
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
uses: ./.github/workflows/build.yml
create_release:
needs: [build]
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download wheels
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Extract Changelog
run: |
VERSION=${GITHUB_REF#refs/*/}
sed -n "/^## \\[${VERSION:1}\\]/,/^## \\[/p" CHANGELOG.md | sed '1,1d; $d' > RELEASE.md
- name: Publish release to GitHub
uses: softprops/action-gh-release@v2
with:
draft: true
body_path: RELEASE.md
files: dist/*.whl
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true