-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (47 loc) · 1.21 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
name: Release Version
# When merged into main
# Check if new test functions are added?
# if no new tests, then it is a patch
on:
push:
branches:
- main
jobs:
release:
name: Creating release
runs-on: "ubuntu-latest"
permissions:
contents: write
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup
run: |
git config --global user.name 'Github Actions'
git config --global user.email 'none@none.none'
- name:
run: echo $(git log -5 --oneline)
- name: Bump version
run: |
if test $(git diff HEAD^ HEAD tests | grep -q "+def")
then
make bump-version-minor
else
make bump-version-patch
fi
- name: Commit version
run: make commit-version-tag
- name: Push to main
run: git push origin $(git rev-parse --abbrev-ref HEAD) --tags
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export tag="$( make version )"
echo "$tag"
make gh-release