Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding binaries (Default, no bidi) to releases #24

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/create-release-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: create-release-binaries

on:
release:
types:
- created

env:
BUILD_TYPE: Release
jobs:
build_and_publish:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
executable_path: /build/TextExtractionCLI
executable_name: TextExtraction
os_name: linux
- os: macos-latest
executable_path: /build/TextExtractionCLI
executable_name: TextExtraction
os_name: mac
extra_cmake_config_flags: -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" # universal. arm and intel
- os: windows-latest
executable_path: /build/TextExtractionCLI/Release
executable_name: TextExtraction.exe
os_name: win
extra_cmake_config_flags: -DCMAKE_GENERATOR_PLATFORM=x64 # make sure it's x64
runs-on: ${{ matrix.os }}
permissions:
contents: write
env:
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-${{ matrix.os_name }}.tar.gz
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.extra_cmake_config_flags}}
- name: Build with CMake
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Create Archive
working-directory: ${{github.workspace}}${{ matrix.executable_path }}
run: tar -czf ${{env.ARCHIVE_NAME}} ${{ matrix.executable_name }}
- name: Upload to release
working-directory: ${{github.workspace}}${{ matrix.executable_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} ${{env.ARCHIVE_NAME}}
Loading