char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
2092353c8
char/aliceai-t5-moe
1name : Make Release 2 3on : 4workflow_dispatch : 5inputs : 6commit : 7description : 'Commit SHA to release (empty = branch HEAD)' 8required : false 9default : '' 10type : string 11dry_run : 12description : 'Dry run - validate without creating the tag' 13required : true 14type : boolean 15default : true 16 17env : 18GH_TOKEN : ${{ github.token }} 19 20permissions : 21contents : write 22packages : write 23 24jobs : 25make-release : 26runs-on : ubuntu-latest 27 28steps : 29- name : Checkout 30uses : actions/checkout@v6 31with : 32ssh-key : ${{ secrets.DEPLOY_KEY_RELEASE }} 33ref : ${{ inputs.commit != '' && inputs.commit || github.ref_name }} 34fetch-depth : 0 35 36- name : Run release checks 37id : checks 38run : bash scripts/make-release-checks.sh ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }} 39env : 40GITHUB_REPOSITORY : ${{ github.repository }} 41RELEASE_BRANCH : ${{ github.ref_name }} 42 43- name : Create release tag 44if : ${{ github.event.inputs.dry_run == 'false' }} 45run : | 46VERSION="${{ steps.checks.outputs.version }}" 47git config user.name "github-actions[bot]" 48git config user.email "github-actions[bot]@users.noreply.github.com" 49git tag -a "${VERSION}" -m "Release ${VERSION}" 50git push origin "${VERSION}" 51echo "Created and pushed tag ${VERSION}" 52 53- name : Generate release description 54id : desc 55run : bash scripts/make-release-desc.sh "${{ steps.checks.outputs.version }}" 56env : 57GITHUB_REPOSITORY : ${{ github.repository }} 58 59- name : Create nightly-tag.txt 60id : nightly_tag_file 61run : | 62NIGHTLY_TAG="${{ steps.desc.outputs.nightly_tag }}" 63if [[ -z "${NIGHTLY_TAG}" ]]; then 64echo "Warning: no nightly tag found for the release commit - nightly-tag.txt will not be created" 65echo "create=false" >> "$GITHUB_OUTPUT" 66exit 0 67fi 68echo "${NIGHTLY_TAG}" > nightly-tag.txt 69echo "create=true" >> "$GITHUB_OUTPUT" 70echo "nightly-tag.txt:" 71cat nightly-tag.txt 72 73- name : Create release 74id : create_release 75if : ${{ github.event.inputs.dry_run == 'false' }} 76uses : ggml-org/action-create-release@v1 77env : 78GITHUB_TOKEN : ${{ github.token }} 79with : 80tag_name : ${{ steps.checks.outputs.version }} 81prerelease : false 82# TODO: enrich the body of the release with more information 83body : | 84## Overview 85 86New version has been released. 87 88## Assets 89 90${{ steps.desc.outputs.nightly }} 91 92## More info 93 94- [Releases and versioning of `ggml-org` projects](https://github.com/ggml-org/ggml/discussions/1579) 95 96## ${{ steps.desc.outputs.changelog_title }} 97 98${{ steps.desc.outputs.changelog }} 99 100- name : Upload nightly-tag.txt 101if : ${{ github.event.inputs.dry_run == 'false' && steps.nightly_tag_file.outputs.create == 'true' }} 102uses : actions/github-script@v8 103with : 104github-token : ${{secrets.GITHUB_TOKEN}} 105script : | 106const fs = require('fs'); 107const release_id = '${{ steps.create_release.outputs.id }}'; 108console.log('uploadReleaseAsset', 'nightly-tag.txt'); 109await github.rest.repos.uploadReleaseAsset({ 110owner: context.repo.owner, 111repo: context.repo.repo, 112release_id: release_id, 113name: 'nightly-tag.txt', 114data: await fs.readFileSync('./nightly-tag.txt') 115}); 116 117- name : Re-tag container images with release version 118if : ${{ github.event.inputs.dry_run == 'false' && steps.desc.outputs.nightly_tag != '' }} 119env : 120GITHUB_REPOSITORY_OWNER : ${{ github.repository_owner }} 121run : | 122VERSION="${{ steps.checks.outputs.version }}" 123NIGHTLY_TAG="${{ steps.desc.outputs.nightly_tag }}" 124REPO_OWNER="${GITHUB_REPOSITORY_OWNER,,}" 125IMAGE_REPO="ghcr.io/${REPO_OWNER}/${{ github.event.repository.name }}" 126 127echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin 128 129VARIANTS=("" "-cuda" "-cuda13" "-vulkan" "-rocm" "-intel" "-musa" "-openvino") 130TYPES=("full" "light" "server") 131for type in "${TYPES[@]}"; do 132for variant in "${VARIANTS[@]}"; do 133src="${IMAGE_REPO}:${type}${variant}-${NIGHTLY_TAG}" 134dst="${IMAGE_REPO}:${type}${variant}-${VERSION}" 135echo "Tagging ${src} -> ${dst}" 136docker buildx imagetools create --tag "${dst}" "${src}" 137done 138done 139 140- name : Dry run summary 141if : ${{ github.event.inputs.dry_run == 'true' }} 142run : | 143 if [[ "${{ steps.checks.outputs.checks_passed }}" == "true" ]]; then 144 echo "Dry run complete - all checks passed." 145 echo "Would have created tag: ${{ steps.checks.outputs.version }}" 146 if [[ -n "${{ steps.desc.outputs.nightly_tag }}" ]]; then 147 echo "Would have uploaded nightly-tag.txt: ${{ steps.desc.outputs.nightly_tag }}" 148 fi 149 else 150 echo "::error::Dry run found release check failures. A release tag would not be created." 151 exit 1 152 fi