File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
name : Build Rust binaries
2
2
on :
3
+ release :
4
+ types : [published]
3
5
workflow_dispatch :
4
6
inputs :
5
7
version :
@@ -42,14 +44,23 @@ jobs:
42
44
ext : " "
43
45
target : aarch64-apple-darwin
44
46
steps :
47
+ - name : Get release tag value
48
+ id : version-tag
49
+ run : |
50
+ if [ -n "${{ inputs.version }}" ]; then
51
+ echo "ref=${{ inputs.version }}" >> $GITHUB_OUTPUT
52
+ else
53
+ ref=$(echo "$GITHUB_REF" | cut -d '/' -f3)
54
+ echo "ref=$ref" >> $GITHUB_OUTPUT
55
+ fi
45
56
- name : Checkout
46
57
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
47
58
with :
48
59
path : checkout-main
49
60
- name : Checkout
50
61
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
51
62
with :
52
- ref : ${{ inputs .version }}
63
+ ref : ${{ steps .version-tag.outputs.ref }}
53
64
path : checkout-tag
54
65
- name : Add target config for arm64 on Linux
55
66
if : ${{ matrix.target.name == 'linux-arm64' }}
68
79
- name : Upload binaries to release
69
80
uses : svenstaro/upload-release-action@v2
70
81
with :
71
- tag : ${{ inputs .version }}
82
+ tag : ${{ steps .version-tag.outputs.ref }}
72
83
file : checkout-tag/target/${{ matrix.target.target }}/release/elasticsearch-core-mcp-server${{ matrix.target.ext }}
73
- asset_name : elasticsearch-core-mcp-server-${{ inputs .version }}-${{ matrix.target.name }}${{ matrix.target.ext }}
84
+ asset_name : elasticsearch-core-mcp-server-${{ steps .version-tag.outputs.ref }}-${{ matrix.target.name }}${{ matrix.target.ext }}
74
85
overwrite : true
You can’t perform that action at this time.
0 commit comments