Files
llama.cpp/.github/workflows/make-release.yml
T

62 lines
1.9 KiB
YAML

name: Make Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g. v0.1.0). Leave empty to use version from CMakeLists.txt'
required: false
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:
fetch-depth: 0
- name: Determine version
id: version
run: bash scripts/release-determine-version.sh "${{ github.event.inputs.version }}"
- name: Check tag does not already exist
run: bash scripts/release-check-tag.sh "${{ steps.version.outputs.version }}"
- name: Check release.yml completed successfully for HEAD
run: bash scripts/release-check-ci.sh ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}
env:
GITHUB_REPOSITORY: ${{ github.repository }}
- name: Check local ggml matches upstream
run: bash scripts/release-check-ggml.sh ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}
- name: Create release tag
if: ${{ github.event.inputs.dry_run == 'false' }}
run: |
VERSION="${{ steps.version.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: Dry run summary
if: ${{ github.event.inputs.dry_run == 'true' }}
run: |
echo "Dry run complete - all checks passed."
echo "Would have created tag: ${{ steps.version.outputs.version }}"