forked from xfwcfw/kelftool
-
Notifications
You must be signed in to change notification settings - Fork 5
102 lines (81 loc) · 2.42 KB
/
compilation.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
name: CI-compile
on:
push:
pull_request:
jobs:
build-windows:
name: Windows compilation
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1.1
- run: choco install --no-progress openssl
- name: Build
run: msbuild /p:Configuration=Release
- uses: actions/upload-artifact@v3
with:
name: kelftool-windows
path: Release/kelftool.exe
build-macos:
name: MacOS compilation
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- run: brew install openssl
- name: Build
run: |
make
tar -zcvf kelftool-macos.tar.gz build/kelftool
- uses: actions/upload-artifact@v2
with:
name: kelftool-macos
path: kelftool-macos.tar.gz
build-ubuntu:
name: Ubuntu compilation
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- run: sudo apt-get install libssl-dev
- name: Build
run: |
make
tar -zcvf kelftool-linux.tar.gz build/kelftool
- uses: actions/upload-artifact@v3
with:
name: kelftool-linux
path: kelftool-linux.tar.gz
release:
needs: [build-windows, build-macos, build-ubuntu]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Download kelftool artifacts
uses: actions/download-artifact@v3
- name: Create pre-release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "latest"
title: "Development build"
files: |
kelftool-linux/*
kelftool-macos/*
kelftool-windows/*
- name: Create Tagged Release Draft
if: startsWith(github.ref, 'refs/tags/v')
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
draft: true
files: |
kelftool-linux/*
kelftool-macos/*
kelftool-windows/*