From: Daniel Bevenius Date: Thu, 28 Aug 2025 07:10:48 +0000 (+0200) Subject: ci : add github release job (#1334) X-Git-Tag: v0.9.1~189 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=83835ffaa0f2e68bc8530bd0a7584711789dc23b;p=pkg%2Fggml%2Fsources%2Fggml ci : add github release job (#1334) * ci : add github release job This commit adds a GitHub Actions workflow to automate the release process. Currently this will only create an archive of the sources for ggml when a tag is pushed. The motivation for this is that when we start releasing versions of ggml using semantic versioning it can be nice to have the sources needed for ggml to be deployed as a github release. This enables CMake users that use `FetchContent` efficiently specify the the zip file instead of cloning. Example usage with `FetchContent`: ```cmake cmake_minimum_required(VERSION 3.14) project(ggml_example) set(CMAKE_CXX_STANDARD 17) include(FetchContent) FetchContent_Declare(ggml URL https://github.com/danbev/ggml/archive/refs/tags/v1.1.5-test.zip DOWNLOAD_EXTRACT_TIMESTAMP TRUE ) FetchContent_MakeAvailable(ggml) add_executable(ggml_example main.cpp) target_link_libraries(ggml_example ggml) ``` And with the following `main.cpp` file: ```c++ #include #include int main() { std::cout << "GGML Version: " << ggml_version() << std::endl; return 0; } ``` This could then be built using: ```console $ cmake -S . -B build $ cmake --build build $ ./build/ggml_example GGML Version: 0.0.2472 ``` --- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..87a6bd8c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Create Release + id: create_release + uses: ggml-org/action-create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false