-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (53 loc) · 1.82 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
name: New release
on:
workflow_dispatch:
push:
branches:
- master
jobs:
draft_release:
runs-on: ubuntu-latest
name: create release draft
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: calculate next version
id: version
uses: patrickjahns/version-drafter-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install poetry
run: pip install poetry
- name: Update Version with poetry
run: poetry version ${{ steps.version.outputs.next-version }}
- name: Update Version in init
run: sed -i "s/^__version__ = \".*\"/__version__ = \"${{ steps.version.outputs.next-version }}\"/g" fortilib/__init__.py
- name: Update Version in docs
run: sed -i "s/^release = \".*\"/release = \"${{ steps.version.outputs.next-version }}\"/g" docs/source/conf.py
- name: Generate changelog
uses: charmixer/auto-changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
future_release: ${{ steps.version.outputs.next-version }}
- name: push new version
uses: github-actions-x/commit@v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'master'
commit-message: 'update version'
force-add: 'true'
files: pyproject.toml fortilib/__init__.py docs/source/conf.py CHANGELOG.md
name: Deutsche Telekom MMS GmbH
email: mms@telekom.de
rebase: true
- uses: actions/checkout@v4
with:
ref: master
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}