Repository navigation
81 lines (72 loc) · 2.22 KB
/
Copy pathpipeline.yml
File metadata and controls
81 lines (72 loc) · 2.22 KB
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
name: libringqueue
on:
push:
tags:
- 'v*.*.*' # Triggers on version tags
branches:
- '**' # Triggers on all branches
workflow_dispatch:
jobs:
build:
name: ${{ matrix.build-name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
build-name: linux
additional-args: "['-DCMAKE_CXX_COMPILER=g++-14']"
- os: windows-2025
build-name: windows
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: lukka/get-cmake@latest
- name: Build the project
uses: lukka/run-cmake@v10
with:
configurePreset: Release
buildPreset: Release
configurePresetAdditionalArgs: ${{ matrix.additional-args }}
- name: Create Github Artifact
uses: actions/upload-artifact@v4.1.0
with:
name: libringqueue-${{ matrix.build-name }}
path: ${{ github.workspace }}/build/Release/libringqueue*
finalize:
runs-on: ubuntu-latest
needs:
- build
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Get Next Version
id: getver
uses: anothrNick/github-tag-action@v1
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref_name == 'main')
env:
GITHUB_TOKEN: ${{ github.token }}
TAG_PREFIX: v
DEFAULT_BUMP: patch
- name: Download Artifact
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && ((startsWith(github.ref, 'refs/tags') || github.ref_name == 'main'))
with:
files: |
${{ github.workspace }}/libringqueue.so
${{ github.workspace }}/libringqueue.dll
${{ github.workspace }}/include/ringqueue.hpp
${{ github.workspace }}/lib/LibRingQueue.hs
tag_name: ${{ steps.getver.outputs.new_tag }}
env:
GITHUB_TOKEN: ${{ github.token }}