forked from vesoft-inc/nebula
-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (91 loc) · 2.9 KB
/
release.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: release
on:
release:
types:
- published
defaults:
run:
shell: bash
jobs:
package:
name: package and upload release assets
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu1604
- ubuntu1804
- ubuntu2004
- centos6
- centos7
- centos8
container:
image: vesoft/nebula-dev:${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: package
run: ./package/package.sh
- name: vars
id: vars
env:
SHA_EXT: sha256sum.txt
run: |
tag=$(echo ${{ github.ref }} | rev | cut -d/ -f1 | rev)
filename=$(find build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm \))
sha256sum $filename > $filename.$SHA_EXT
echo "::set-output name=tag::$tag"
echo "::set-output name=filepath::$filename"
echo "::set-output name=shafilepath::$filename.$SHA_EXT"
- name: upload release asset
run: |
./ci/scripts/upload-github-release-asset.sh \
github_token=${{ secrets.GITHUB_TOKEN }} \
repo=${{ github.repository }} \
tag=${{ steps.vars.outputs.tag }} \
filepath=${{ steps.vars.outputs.filepath }}
./ci/scripts/upload-github-release-asset.sh \
github_token=${{ secrets.GITHUB_TOKEN }} \
repo=${{ github.repository }} \
tag=${{ steps.vars.outputs.tag }} \
filepath=${{ steps.vars.outputs.shafilepath }}
- name: upload package to oss
run: |
./ci/scripts/upload-oss.sh \
OSS_ENDPOINT=${{ secrets.OSS_ENDPOINT }} \
OSS_ID=${{ secrets.OSS_ID }} \
OSS_SECRET=${{ secrets.OSS_SECRET }} \
tag=${{ steps.vars.outputs.tag }} \
filepath=${{ steps.vars.outputs.filepath }}
./ci/scripts/upload-oss.sh \
OSS_ENDPOINT=${{ secrets.OSS_ENDPOINT }} \
OSS_ID=${{ secrets.OSS_ID }} \
OSS_SECRET=${{ secrets.OSS_SECRET }} \
tag=${{ steps.vars.outputs.tag }} \
filepath=${{ steps.vars.outputs.shafilepath }}
docker:
name: build docker images
runs-on: ubuntu-latest
strategy:
matrix:
service:
- metad
- storaged
- graphd
- console
- graph
- tools
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: vesoft/nebula-${{ matrix.service }}
tags: latest
tag_with_ref: true
dockerfile: docker/Dockerfile.${{ matrix.service }}
cache_froms: vesoft/nebula-dev:centos7,centos:7
add_git_labels: true