-
Notifications
You must be signed in to change notification settings - Fork 1.2k
108 lines (90 loc) · 3.13 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Release
on:
push:
tags:
- "v*.*.*"
env:
BUILD_TYPE: Release
jobs:
build:
name: Build binary
strategy:
matrix:
include:
- os: ubuntu-latest
name: ${{ github.event.repository.name }}-${{ github.ref_name }}-ubuntu-amd64.tar.gz
- os: macos-latest
name: ${{ github.event.repository.name }}-${{ github.ref_name }}-macos-amd64.tar.gz
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Release build os - ${{ matrix.os }}
run: |
chmod +x ci/release-build.sh
./ci/release-build.sh install ${{ matrix.os }} ${{ env.BUILD_TYPE }}
- name: Calculate checksum and rename binary
run: |
chmod +x ci/release-build.sh
./ci/release-build.sh checksum ${{ github.event.repository.name }} ${{ matrix.name }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: build/${{ matrix.name }}
- name: Upload checksum of artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}.sha256sum
path: build/${{ matrix.name }}.sha256sum
centos:
runs-on: ubuntu-latest
container:
image: centos:7
env:
name: ${{ github.event.repository.name }}-${{ github.ref_name }}-centos-amd64.tar.gz
steps:
- name: Install deps
run: |
yum install -y wget git autoconf centos-release-scl gcc perl-Digest-SHA
yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-make devtoolset-10-bin-util
yum install -y llvm-toolset-7 llvm-toolset-7-clang tcl which
- name: Install cmake
run: |
wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh
bash ./cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Release build os - centos
run: |
chmod +x ci/release-build.sh
./ci/release-build.sh install centos ${{ env.BUILD_TYPE }} -xe
- name: Calculate checksum and rename binary
shell: bash
run: ./ci/release-build.sh checksum ${{ github.event.repository.name }} ${{ env.name }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.name }}
path: build/${{ env.name }}
- name: Upload checksum of artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.name }}.sha256sum
path: build/${{ env.name }}.sha256sum
release:
name: Release artifacts
needs: [ build,centos ]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Publish release
uses: softprops/action-gh-release@v1
with:
name: "Release ${{ github.ref_name }}"
generate_release_notes: true
files: |
**/${{ github.event.repository.name }}-*