-
Notifications
You must be signed in to change notification settings - Fork 12
64 lines (53 loc) · 1.65 KB
/
ci.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
name: Build and Deploy SyDEVS
on:
push:
tags:
- 'v*'
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Windows Build
if: runner.os == 'Windows'
run: choco install visualstudio2022buildtools --yes
shell: powershell
- name: Setup Linux Build
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y build-essential cmake
- name: Configure Build
run: cmake -S . -B build
shell: bash
- name: Build Project
run: cmake --build build --config Release --parallel
shell: bash
deploy:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Prepare Release Package
run: |
sudo apt-get install -y doxygen
(cat doxygen.config; echo "PROJECT_NUMBER=${{ github.ref_name }}") | doxygen -
zip -r SyDEVS-${{ github.ref_name }}.zip doc src CMakeLists.txt CODE_OF_CONDUCT.md CONTRIBUTING.md doxygen.config LICENSE.md README.md
shell: bash
- name: Upload Release Package
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: SyDEVS-${{ github.ref_name }}.zip
asset_name: SyDEVS-${{ github.ref_name }}.zip
tag: ${{ github.ref_name }}
overwrite: false
body: "Release Package for SyDEVS ${{ github.ref_name }}"