Skip to content

Commit 37929b0

Browse files
authored
adding binaries (Default, no bidi) to releases (#24)
* feat: adding release binaries (default compilation) * lets try with bidi * does it matter if i flip * you know what. nevermind. this might be a complication and im not looking for any. no bidi
1 parent 78ad2a2 commit 37929b0

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
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.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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}}

0 commit comments

Comments
 (0)