mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-08-27 15:41:19 +02:00
8b86400975
* ci : create pre-release with change log and nightly link in make-release After pushing the tag, create a pre-release using ggml-org/action-create-release. The release description is generated by scripts/make-release-desc.sh: the change log between the current and previous version (one line per commit), a link to the corresponding nightly build when it exists, and a note that semantic versioning is still work in progress. Assisted-by: pi:llama.cpp/Qwen3.8-27B * cmake : bump version to 0.1.2 Assisted-by: pi:llama.cpp/Qwen3.8-27B * ci : find the nightly tag by commit in make-release-desc.sh The nightly release is guaranteed by the release checks to point at HEAD, so instead of reconstructing its name (commit count, branch, hash) just pick the b* tag pointing at HEAD. This also drops the RELEASE_BRANCH env var from the workflow. Assisted-by: pi:llama.cpp/Qwen3.8-27B * ci : resolve the release commit from the version tag in make-release-desc.sh The change log and nightly lookup now use the commit the version tag points at (HEAD when the tag does not exist), instead of always HEAD. This makes the script usable locally for older versions, e.g. ./scripts/make-release-desc.sh v0.1.1. The tag is resolved to a SHA first, since --points-at does not peel annotated tags. Assisted-by: pi:llama.cpp/Qwen3.8-27B * ci : normalize the version argument in make-release-desc.sh Accept the version with or without the leading v (0.1.1 == v0.1.1) and reject anything else, instead of silently treating a bare version as a non-existent tag name. Assisted-by: pi:llama.cpp/Qwen3.8-27B * cont : clean-up
89 lines
2.8 KiB
YAML
89 lines
2.8 KiB
YAML
name: Make Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
commit:
|
|
description: 'Commit SHA to release (empty = branch HEAD)'
|
|
required: false
|
|
default: ''
|
|
type: string
|
|
dry_run:
|
|
description: 'Dry run - validate without creating the tag'
|
|
required: true
|
|
type: boolean
|
|
default: true
|
|
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
make-release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ssh-key: ${{ secrets.DEPLOY_KEY_RELEASE }}
|
|
ref: ${{ inputs.commit != '' && inputs.commit || github.ref_name }}
|
|
fetch-depth: 0
|
|
|
|
- name: Run release checks
|
|
id: checks
|
|
run: bash scripts/make-release-checks.sh ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}
|
|
env:
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
RELEASE_BRANCH: ${{ github.ref_name }}
|
|
|
|
- name: Create release tag
|
|
if: ${{ github.event.inputs.dry_run == 'false' }}
|
|
run: |
|
|
VERSION="${{ steps.checks.outputs.version }}"
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git tag -a "${VERSION}" -m "Release ${VERSION}"
|
|
git push origin "${VERSION}"
|
|
echo "Created and pushed tag ${VERSION}"
|
|
|
|
- name: Generate release description
|
|
id: desc
|
|
run: bash scripts/make-release-desc.sh "${{ steps.checks.outputs.version }}"
|
|
env:
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
|
|
- name: Create release
|
|
if: ${{ github.event.inputs.dry_run == 'false' }}
|
|
uses: ggml-org/action-create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
with:
|
|
tag_name: ${{ steps.checks.outputs.version }}
|
|
# TODO: remove the prerelease flag once the semantic versioning workflow is ready
|
|
# ref: https://github.com/ggml-org/ggml/discussions/1579
|
|
prerelease: true
|
|
body: |
|
|
> [!NOTE]
|
|
> Semantic versioning is still work in progress.
|
|
> More info can be found in https://github.com/ggml-org/ggml/discussions/1579
|
|
|
|
${{ steps.desc.outputs.nightly }}
|
|
|
|
## ${{ steps.desc.outputs.changelog_title }}
|
|
|
|
${{ steps.desc.outputs.changelog }}
|
|
|
|
- name: Dry run summary
|
|
if: ${{ github.event.inputs.dry_run == 'true' }}
|
|
run: |
|
|
if [[ "${{ steps.checks.outputs.checks_passed }}" == "true" ]]; then
|
|
echo "Dry run complete - all checks passed."
|
|
echo "Would have created tag: ${{ steps.checks.outputs.version }}"
|
|
else
|
|
echo "::error::Dry run found release check failures. A release tag would not be created."
|
|
exit 1
|
|
fi
|