mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-28 19:53:52 +00:00
* Adding package to release * Fix build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Cleaner, tigher packages * Do not add package to release
59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
name: Build
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- v*
|
|
tags:
|
|
- "*"
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
single-header:
|
|
name: Single header
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: actions/setup-python@v1
|
|
|
|
- name: Make header
|
|
run: python ./scripts/MakeSingleHeader.py CLI11.hpp
|
|
|
|
# Build in place for simplicity - don't do this in real life!
|
|
- name: Prepare CMake config
|
|
run: cmake -S . -B build
|
|
|
|
- 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.* .
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
with:
|
|
name: CLI11.hpp
|
|
path: CLI11.hpp
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
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 }}
|