-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (46 loc) · 1.64 KB
/
make-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
53
54
55
56
57
name: Release snippets
on:
push:
tags:
- "v*"
jobs:
tagged-release:
name: Tagged Release
runs-on: ubuntu-latest
steps:
- name: Checkout parent project
uses: actions/checkout@v2
with:
repository: ivan100sic/snippets-cpp
path: parent
- name: Checkout this repo
uses: actions/checkout@v2
with:
path: main
- name: Add Toolchain APT repository
run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- name: Install g++-11
run: sudo apt-get install -y g++-11
- name: Prepare CMake build folder
working-directory: ./parent
run: mkdir build
- name: Generate CMake build files
working-directory: ./parent/build
run: cmake .. -D CMAKE_CXX_COMPILER=g++-11
- name: Build parent
working-directory: ./parent/build
run: cmake --build .
- name: Generate artifacts
run: |
./parent/build/generate --sources_folder=./main --cpp-standard=20 > vscode-cpp20.code-snippets
./parent/build/generate --sources_folder=./main --cpp-standard=17 > vscode-cpp17.code-snippets
./parent/build/generate --sources_folder=./main --cpp-standard=14 > vscode-cpp14.code-snippets
./parent/build/generate --sources_folder=./main --cpp-standard=11 > vscode-cpp11.code-snippets
./parent/build/generate --sources_folder=./main --cpp-standard=3 > vscode-cpp03.code-snippets
- name: Make Github release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
*.code-snippets