-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.36 KB
/
auto-tag-and-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
name: Tag and Release
on:
push:
branches: [ main ]
jobs:
tag-and-release:
name: Tag and Release
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v3
with:
path: "requirements-dev.txt"
- name: set pythonpath
run: |
echo "PYTHONPATH=src/" >> $GITHUB_ENV
- name: Test with pytest
run: |
pytest
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
default_bump: false
github_token: ${{ secrets.ACTION_WORKFLOW }}
release_branches: main
custom_release_rules: feat:minor:Features,fix:patch:Bug Fixes,test:patch:Tests,docs:patch:Documentation,major:major:Major Releases
- name: Create a GitHub release
if: ${{ steps.tag_version.outputs.new_tag }}
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}