forked from ydataai/ydata-profiling
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (42 loc) · 1.35 KB
/
merge-dev.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
name: Merge into develop branch
on:
push:
branches:
- develop
jobs:
prepare:
name: Calculate Version and Build Number
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.version.outputs.value }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Find Latest Tag
id: latest_tag
uses: oprypin/find-latest-tag@v1.1.1
with:
repository: ${{ github.repository }}
regex: '^v\d+\.\d+\.\d+'
releases-only: true
- name: Extract semantic version
id: semantic
run: echo "value=$(echo ${{ steps.latest_tag.outputs.tag }} | sed -r 's|([0-9]+.[0-9]+.[0-9]+).*|\1|g')" >> $GITHUB_OUTPUT
- name: Count number or releases for tag
id: build_number
run: echo "value=$(($(git tag | grep -c ${{ steps.semantic.outputs.value }}.pre) + 1))" >> $GITHUB_OUTPUT
- name: Compute version
id: version
run: echo "value=${{ steps.semantic.outputs.value }}.pre${{ steps.build_number.outputs.value }}" >> $GITHUB_OUTPUT
prerelease-tag:
name: Create Prerelease Tag
runs-on: ubuntu-22.04
needs:
- prepare
steps:
- uses: ydataai/create-tag@v1.0.0
with:
tag: ${{ needs.prepare.outputs.version }}
message: ${{ github.event.head_commit.message }}
github_token: ${{ secrets.ACCESS_TOKEN }}