forked from ggml-org/llama.cpp
-
-
Notifications
You must be signed in to change notification settings - Fork 65
58 lines (49 loc) · 1.53 KB
/
Copy pathrelease-dispatch.yml
File metadata and controls
58 lines (49 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Dispatch Stable Release
run-name: Dispatch release ${{ github.ref_name }}
on:
push:
tags:
- "v*"
permissions:
actions: write
contents: read
jobs:
dispatch:
name: Dispatch main-owned release workflow
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Resolve release inputs
id: meta
shell: bash
run: |
set -euo pipefail
source_ref="${GITHUB_REF_NAME}"
tag_name="${GITHUB_REF_NAME}"
if [[ "${GITHUB_REF}" != refs/tags/v* ]]; then
echo "Unsupported ref ${GITHUB_REF}; stable release dispatch requires a v* tag." >&2
exit 1
fi
source_sha="$(git rev-list -n 1 "${tag_name}")"
{
echo "source_ref=${source_ref}"
echo "source_sha=${source_sha}"
echo "tag_name=${tag_name}"
} >> "${GITHUB_OUTPUT}"
- name: Dispatch main-owned release workflow
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SOURCE_REF: ${{ steps.meta.outputs.source_ref }}
SOURCE_SHA: ${{ steps.meta.outputs.source_sha }}
TAG_NAME: ${{ steps.meta.outputs.tag_name }}
run: |
set -euo pipefail
gh workflow run release.yml \
--ref main \
--field source_ref="${SOURCE_REF}" \
--field source_sha="${SOURCE_SHA}" \
--field tag_name="${TAG_NAME}" \
--field publish_release="true"