C Releases #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C Releases | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Release tag (.eg v1.0.0)' | |
required: true | |
type: string | |
jobs: | |
build_and_upload_c_lib_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get Conan | |
uses: turtlebrowser/get-conan@v1.2 | |
- name: Create default profile | |
run: conan profile detect --force | |
- name: Install dependencies | |
run: | | |
cd c | |
conan install . --output-folder=build --build=missing | |
- name: Set up build environment | |
run: | | |
cd c/build | |
sh conanbuild.sh | |
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release | |
- name: Build all targets | |
run: | | |
cd c/build | |
make build | |
- name: Build `data.h` | |
run: | | |
cd c | |
./build/build | |
- name: Create release folder | |
run: mkdir -p github-release | |
- name: Create archive | |
uses: TheDoctor0/zip-release@0.7.6 | |
with: | |
type: 'tar' | |
filename: 'github-release/c-release.tar.gz' | |
directory: 'c' | |
exclusions: './build/* github-release' | |
- name: Upload release | |
uses: ncipollo/release-action@v1.14.0 | |
with: | |
name: 'Kuliya latest' | |
artifacts: 'github-release/c-release.tar.gz' | |
tag: 'c-${{ inputs.tag }}' | |
token: ${{ secrets.GITHUB_TOKEN }} |