-
Notifications
You must be signed in to change notification settings - Fork 14
61 lines (51 loc) · 1.32 KB
/
publish.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
name: 🏗️Build and 📦publish ☀️release
on: push
jobs:
build:
name: 🏗️ build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- uses: actions/upload-artifact@master
with:
name: buildfiles
path: .
release:
name: ☀️create release
runs-on: ubuntu-latest
needs: [build]
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- uses: actions/download-artifact@master
with:
name: buildfiles
path: .
- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
- name: create release
uses: softprops/action-gh-release@v1
with:
files: dist/*
body: ${{ steps.changelog_reader.outputs.changes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}