-
Notifications
You must be signed in to change notification settings - Fork 54
52 lines (45 loc) · 1.58 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
name: release
on:
push:
tags:
- '*'
jobs:
build-release:
strategy:
matrix:
os:
- ubuntu-20.04
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup build dependencies
if: matrix.os == 'ubuntu-20.04'
run: |
echo "TLSSCAN_OS=linux" >> $GITHUB_ENV
sudo apt install -y autoconf automake libtool pkg-config gcc unzip
- name: Setup MacOS build dependencies
if: matrix.os == 'macos-latest'
run: |
echo "TLSSCAN_OS=darwin" >> $GITHUB_ENV
brew install autoconf automake libtool
- name: build-x86-64
run: |
./build-x86-64.sh
grep Version -m 1 $GITHUB_WORKSPACE/CHANGELOG | awk '{printf "TLSSCAN_VERSION=%s", $2}' >> $GITHUB_ENV
- name: build-package
run: |
rm $GITHUB_WORKSPACE/tls-scan
mkdir -p $GITHUB_WORKSPACE/tls-scan/man/man1
cp $GITHUB_WORKSPACE/build-root/bin/tls-scan $GITHUB_WORKSPACE/tls-scan/tls-scan
cp $GITHUB_WORKSPACE/build-root/share/man/man1/tls-scan.1 $GITHUB_WORKSPACE/tls-scan/man/man1/tls-scan.1
cp $GITHUB_WORKSPACE/build-root/etc/tls-scan/ca-bundle.crt $GITHUB_WORKSPACE/tls-scan/ca-bundle.crt
tar -zcvf tls-scan-${{env.TLSSCAN_VERSION}}-${{env.TLSSCAN_OS}}-amd64.tar.gz ./tls-scan/
- name: GH Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
tls-scan-${{env.TLSSCAN_VERSION}}-${{env.TLSSCAN_OS}}-amd64.tar.gz