Commit 9549c6287f0bb3b95c92bd54c4b5f56f3a7c503a
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
Showing
2 changed files
with
34 additions
and
2 deletions
.github/workflows/build.yml
| @@ -17,20 +17,42 @@ jobs: | @@ -17,20 +17,42 @@ jobs: | ||
| 17 | steps: | 17 | steps: |
| 18 | 18 | ||
| 19 | - uses: actions/checkout@v1 | 19 | - uses: actions/checkout@v1 |
| 20 | + with: | ||
| 21 | + submodules: true | ||
| 22 | + | ||
| 20 | - uses: actions/setup-python@v1 | 23 | - uses: actions/setup-python@v1 |
| 21 | 24 | ||
| 22 | - name: Make header | 25 | - name: Make header |
| 23 | run: python ./scripts/MakeSingleHeader.py CLI11.hpp | 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 | - uses: actions/upload-artifact@v1 | 41 | - uses: actions/upload-artifact@v1 |
| 26 | with: | 42 | with: |
| 27 | name: CLI11.hpp | 43 | name: CLI11.hpp |
| 28 | path: CLI11.hpp | 44 | path: CLI11.hpp |
| 29 | 45 | ||
| 46 | + - uses: actions/upload-artifact@v1 | ||
| 47 | + with: | ||
| 48 | + name: CLI11-Source | ||
| 49 | + path: CLI11-Source | ||
| 50 | + | ||
| 30 | - name: Release | 51 | - name: Release |
| 31 | uses: softprops/action-gh-release@v1 | 52 | uses: softprops/action-gh-release@v1 |
| 32 | if: startsWith(github.ref, 'refs/tags/') | 53 | if: startsWith(github.ref, 'refs/tags/') |
| 33 | with: | 54 | with: |
| 34 | - files: CLI11.hpp | 55 | + files: | |
| 56 | + CLI11.hpp | ||
| 35 | env: | 57 | env: |
| 36 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | 58 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
CMakeLists.txt
| @@ -286,7 +286,17 @@ set(CPACK_SOURCE_IGNORE_FILES | @@ -286,7 +286,17 @@ set(CPACK_SOURCE_IGNORE_FILES | ||
| 286 | /\\\\.DS_Store | 286 | /\\\\.DS_Store |
| 287 | /.*\\\\.egg-info | 287 | /.*\\\\.egg-info |
| 288 | /var | 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 | set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) | 302 | set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |