Squashed 'libs/cli11/' content from commit dcbcb47
git-subtree-dir: libs/cli11 git-subtree-split: dcbcb4721dda5dab0a56d9faaaee50e6a30f7758
This commit is contained in:
59
.github/workflows/build.yml
vendored
Normal file
59
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v*
|
||||
tags:
|
||||
- "*"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
single-header:
|
||||
name: Single header
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Prepare CMake config
|
||||
run: cmake -S . -B build -DCLI11_SINGLE_FILE=ON
|
||||
|
||||
- name: Make package
|
||||
run: cmake --build build --target package_source
|
||||
|
||||
- name: Copy source packages
|
||||
run: |
|
||||
mkdir -p CLI11-Source
|
||||
cp build/CLI11-*-Source.* CLI11-Source
|
||||
cp build/CLI11-*-Source.* .
|
||||
|
||||
- name: Make header
|
||||
run: cmake --build build --target CLI11-generate-single-file
|
||||
|
||||
- name: Copy file to main folder
|
||||
run: cp build/include/CLI11.hpp CLI11.hpp
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: CLI11.hpp
|
||||
path: CLI11.hpp
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: CLI11-Source
|
||||
path: CLI11-Source
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
CLI11.hpp
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user