From 9549c6287f0bb3b95c92bd54c4b5f56f3a7c503a Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 31 Jan 2020 13:17:11 -0500 Subject: [PATCH] Clean up sdist creation (#422) * 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 --- .github/workflows/build.yml | 24 +++++++++++++++++++++++- CMakeLists.txt | 12 +++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce8c4c24..7bd7770f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,20 +17,42 @@ jobs: 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 + files: | + CLI11.hpp env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index e5945f93..4bd0568c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -286,7 +286,17 @@ set(CPACK_SOURCE_IGNORE_FILES /\\\\.DS_Store /.*\\\\.egg-info /var - /Pipfile.*$ + /azure-pipelines.yml + /.ci + /docs + /examples + /test_package + /book + /.travis.yml + .swp + /.all-contributorsrc + /.appveyor.yml + /.pre-commit.*yaml ) set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})