File tree Expand file tree Collapse file tree 2 files changed +51
-1
lines changed
Expand file tree Collapse file tree 2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 1818 runs-on : ubuntu-latest
1919
2020 steps :
21- - uses : actions/checkout@v3
21+ - uses : actions/checkout@v4
2222
2323 - name : Configure CMake
2424 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Original file line number Diff line number Diff line change 1+ name : create-release-binaries
2+
3+ on :
4+ release :
5+ types :
6+ - created
7+
8+ env :
9+ BUILD_TYPE : Release
10+ jobs :
11+ build_and_publish :
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ os : [ubuntu-latest, macos-latest, windows-latest]
16+ include :
17+ - os : ubuntu-latest
18+ executable_path : /build/TextExtractionCLI
19+ executable_name : TextExtraction
20+ os_name : linux
21+ - os : macos-latest
22+ executable_path : /build/TextExtractionCLI
23+ executable_name : TextExtraction
24+ os_name : mac
25+ extra_cmake_config_flags : -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" # universal. arm and intel
26+ - os : windows-latest
27+ executable_path : /build/TextExtractionCLI/Release
28+ executable_name : TextExtraction.exe
29+ os_name : win
30+ extra_cmake_config_flags : -DCMAKE_GENERATOR_PLATFORM=x64 # make sure it's x64
31+ runs-on : ${{ matrix.os }}
32+ permissions :
33+ contents : write
34+ env :
35+ ARCHIVE_NAME : ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-${{ matrix.os_name }}.tar.gz
36+ steps :
37+ - uses : actions/checkout@v4
38+ - name : Configure CMake
39+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.extra_cmake_config_flags}}
40+ - name : Build with CMake
41+ run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
42+ - name : Create Archive
43+ working-directory : ${{github.workspace}}${{ matrix.executable_path }}
44+ run : tar -czf ${{env.ARCHIVE_NAME}} ${{ matrix.executable_name }}
45+ - name : Upload to release
46+ working-directory : ${{github.workspace}}${{ matrix.executable_path }}
47+ env :
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+ run : |
50+ gh release upload ${{ github.event.release.tag_name }} ${{env.ARCHIVE_NAME}}
You can’t perform that action at this time.
0 commit comments