-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild._yml
More file actions
49 lines (40 loc) · 1.24 KB
/
build._yml
File metadata and controls
49 lines (40 loc) · 1.24 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Tag main commit with version number
on:
push:
branches: ["main"]
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout submodule core -- pull submodule
uses: actions/checkout@v3
with:
repository: DecentrAI/core
path: core
- name: Checkout submodule core
run:
git submodule update --init --recursive
- name: Configure Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Retrieve version
id: retrieve_version
run: |
echo "VERSION=$(cat ver.py | grep -o "'.*'")" >> $GITHUB_ENV
- name: Debug version
run: |
VERSION=${VERSION//\'/}
echo "Version to tag: '$VERSION'"
env:
VERSION: ${{ env.VERSION }}
- name: Tag main commit
run: |
VERSION=${VERSION//\'/}
git tag -a $VERSION -m "Version $VERSION"
git push origin $VERSION
env:
VERSION: ${{ env.VERSION }}