forked from Data-Centric-AI-Community/fg-data-profiling
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (45 loc) · 1.45 KB
/
merge-dev.yml
File metadata and controls
60 lines (45 loc) · 1.45 KB
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
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@v3
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 ::set-output name=value::$(echo ${{ steps.latest_tag.outputs.tag }} | sed -r 's|([0-9]+.[0-9]+.[0-9]+).*|\1|g')
- name: Computed Semantic Version
run: echo ${{ steps.semantic.outputs.value }}
- name: Count number or releases for tag
id: build_number
run: echo "::set-output name=value::$(($(git tag | grep -c ${{ steps.semantic.outputs.value }}.pre) + 1))"
- name: Compute version
id: version
run: echo "::set-output name=value::${{ steps.semantic.outputs.value }}.pre${{ steps.build_number.outputs.value }}"
prerelease-tag:
name: Create Prerelease Tag
runs-on: ubuntu-22.04
needs:
- prepare
steps:
- uses: simpleactions/create-tag@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag: ${{ needs.prepare.outputs.version }}
message: ${{ github.event.head_commit.message }}