Commit 9549c6287f0bb3b95c92bd54c4b5f56f3a7c503a

Authored by Henry Schreiner
Committed by GitHub
1 parent ee851c7e

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
... ... @@ -17,20 +17,42 @@ jobs:
17 17 steps:
18 18  
19 19 - uses: actions/checkout@v1
  20 + with:
  21 + submodules: true
  22 +
20 23 - uses: actions/setup-python@v1
21 24  
22 25 - name: Make header
23 26 run: python ./scripts/MakeSingleHeader.py CLI11.hpp
24 27  
  28 + # Build in place for simplicity - don't do this in real life!
  29 + - name: Prepare CMake config
  30 + run: cmake -S . -B build
  31 +
  32 + - name: Make package
  33 + run: cmake --build build --target package_source
  34 +
  35 + - name: Copy source packages
  36 + run: |
  37 + mkdir -p CLI11-Source
  38 + cp build/CLI11-*-Source.* CLI11-Source
  39 + cp build/CLI11-*-Source.* .
  40 +
25 41 - uses: actions/upload-artifact@v1
26 42 with:
27 43 name: CLI11.hpp
28 44 path: CLI11.hpp
29 45  
  46 + - uses: actions/upload-artifact@v1
  47 + with:
  48 + name: CLI11-Source
  49 + path: CLI11-Source
  50 +
30 51 - name: Release
31 52 uses: softprops/action-gh-release@v1
32 53 if: startsWith(github.ref, 'refs/tags/')
33 54 with:
34   - files: CLI11.hpp
  55 + files: |
  56 + CLI11.hpp
35 57 env:
36 58 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
... ...
CMakeLists.txt
... ... @@ -286,7 +286,17 @@ set(CPACK_SOURCE_IGNORE_FILES
286 286 /\\\\.DS_Store
287 287 /.*\\\\.egg-info
288 288 /var
289   - /Pipfile.*$
  289 + /azure-pipelines.yml
  290 + /.ci
  291 + /docs
  292 + /examples
  293 + /test_package
  294 + /book
  295 + /.travis.yml
  296 + .swp
  297 + /.all-contributorsrc
  298 + /.appveyor.yml
  299 + /.pre-commit.*yaml
290 300 )
291 301  
292 302 set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
... ...