-
Notifications
You must be signed in to change notification settings - Fork 172
50 lines (48 loc) · 1.7 KB
/
release.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
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.04
- centos-7
- centos-8
container:
image: baikalgroup/baikal-dev:${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Install Bazel Cache
run: cd /work && cp -r /__w/BaikalDB/BaikalDB . && tar xfz bazelcache.tgz
- name: Build & Package
run: tag=`echo ${{ github.ref }} | awk -F"/" '{print $NF}'` && cd /work/BaikalDB && env HOME=/work USER=work bazelisk build //:all && bash ./ci/package.sh version=$tag os=${{ matrix.os }}
- name: vars
id: vars
env:
SHA_EXT: sha256sum
run: |
tag=`echo ${{ github.ref }} | awk -F"/" '{print $NF}'`
filename=`find /work/pack -type f -name *.tgz`
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: |
bash ./ci/upload-release-asset.sh \
github_token=${{ secrets.GITHUB_TOKEN }} \
repo=${{ github.repository }} \
tag=${{ steps.vars.outputs.tag }} \
filepath=${{ steps.vars.outputs.filepath }}
bash ./ci/upload-release-asset.sh \
github_token=${{ secrets.GITHUB_TOKEN }} \
repo=${{ github.repository }} \
tag=${{ steps.vars.outputs.tag }} \
filepath=${{ steps.vars.outputs.shafilepath }}