-
Notifications
You must be signed in to change notification settings - Fork 74
54 lines (44 loc) · 1.28 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
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies with pipenv
run: |
pip install pipenv
pipenv install --deploy --dev
- name: Get tag
id: tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Get Changelog
id: get_changelog
run: |
LOG=$(make get_last_changelog_entry | tail -n +2)
echo "LOG<<EOF" >> $GITHUB_ENV
echo "$LOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Build project
run: make build
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
body: ${{env.LOG}}
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: steps.check-version.outputs.prerelease == 'true'
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_PASSWORD }}