forked from google/breakpad
-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (89 loc) · 2.83 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
96
97
98
99
100
101
102
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
type: string
env:
TERM: xterm-256color
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- name: Release - Ubuntu
short-name: lin64
runs-on: ubuntu-latest
cmake-args: -G Ninja -D CMAKE_EXE_LINKER_FLAGS=-static
compiler: clang
cxx-compiler: clang++
- name: Release - macOS
short-name: mac64
runs-on: macos-latest
cmake-args: -G Xcode -D CMAKE_OSX_DEPLOYMENT_TARGET=10.13
- name: Release - Windows
short-name: win64
runs-on: windows-latest
cmake-args: -D CMAKE_GENERATOR_PLATFORM=x64 -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
steps:
- name: Setup environment
if: runner.os == 'Windows'
run: git config --global core.autocrlf false
- name: Checkout repository
uses: actions/checkout@v3
- name: Install packages (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get install -y ninja-build
- name: Compiling source code
run: |
cmake -S . -B build ${{ matrix.cmake-args }} -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=MinSizeRel
cmake --build build --config MinSizeRel
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.cxx-compiler }}
- name: Upload artifacts (macOS/Linux)
uses: actions/upload-artifact@v3
if: runner.os != 'Windows'
with:
name: breakpad-utilities-${{ matrix.short-name }}
path: |
build/minidump*
build/dump_sym*
retention-days: 7
- name: Upload artifacts (Windows)
uses: actions/upload-artifact@v3
if: runner.os == 'Windows'
with:
name: breakpad-utilities-${{ matrix.short-name }}
path: |
build/MinSizeRel/minidump*
build/MinSizeRel/dump_sym*
build/MinSizeRel/msdia*
retention-days: 7
deploy:
name: Deploy Build - Ubuntu
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Package release assets
run: |
cd breakpad-utilities-lin64
7z a -tzip ../breakpad-utilities-lin64.zip *
cd ../breakpad-utilities-mac64
7z a -tzip ../breakpad-utilities-mac64.zip *
cd ../breakpad-utilities-win64
7z a -tzip ../breakpad-utilities-win64.zip *
- name: Create GitHub release
run: |
gh release create ${{ github.event.inputs.version }} --generate-notes breakpad-utilities-*.zip
env:
GH_TOKEN: ${{ github.token }}