File tree 1 file changed +54
-0
lines changed
1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release Artifact
2
+
3
+ on :
4
+ push :
5
+ branches : [ "master" ]
6
+ tags :
7
+ - ' *'
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ container : dingodatabase/dingo-base:rocky9
13
+
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Record event type
19
+ run : |
20
+ echo "hello dingo eureka" > event.txt
21
+ if [ "${{ github.event_name }}" == "pull_request" ]; then
22
+ echo "EVENT_TYPE=PR" >> $GITHUB_ENV
23
+ elif [ "${{ github.event_name }}" == "push" ]; then
24
+ if [[ "${{ github.ref }}" == refs/tags/* ]]; then
25
+ echo "EVENT_TYPE=TAG" >> $GITHUB_ENV
26
+ tagInfo=echo "${{ github.ref }}" | sed 's/refs\/tags\///'
27
+ echo "TAG_NAME=$tagInfo" >> $GITHUB_ENV
28
+ else
29
+ echo "EVENT_TYPE=PUSH" >> $GITHUB_ENV
30
+ echo "TAG_NAME=latest" >> $GITHUB_ENV
31
+ fi
32
+ fi
33
+
34
+ - name : Set Safe Dir
35
+ run : git config --global --add safe.directory $PWD
36
+
37
+ - name : Sync submodules
38
+ run : |
39
+ git submodule sync --recursive
40
+ git submodule update --init --recursive
41
+
42
+ - name : Build binary
43
+ run : |
44
+ make build
45
+
46
+ - name : Release
47
+ uses : softprops/action-gh-release@v2
48
+ if : ${{ github.event_name == 'push'}}
49
+ with :
50
+ files : |
51
+ bin/dingoadm
52
+ name : dingoadm
53
+ tag_name : ${{ env.TAG_NAME }}
54
+ token : ${{ secrets.GH_TOKEN }}
You can’t perform that action at this time.
0 commit comments