Repository navigation
91 lines (84 loc) · 3.04 KB
/
Copy pathbinary.yml
File metadata and controls
91 lines (84 loc) · 3.04 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Binary Releases
on:
push:
tags:
- 'v*'
# Release calls this workflow directly for tidx@ tags to avoid duplicate App-token builds.
workflow_call:
inputs:
tag:
description: 'Release tag'
required: true
type: string
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v0.0.35 or tidx@0.0.37)'
required: true
permissions: {}
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
asset: tidx-linux-amd64
- os: macos-latest
target: x86_64-apple-darwin
asset: tidx-darwin-amd64
- os: macos-latest
target: aarch64-apple-darwin
asset: tidx-darwin-arm64
steps:
- name: Secure runner
uses: tempoxyz/gh-actions/actions/secure-runner@35019557465e3c38ee3468be171771fd73577584 # 2026-10-20T06-22-38Z-35019557
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
ref: ${{ inputs.tag || github.ref }}
persist-credentials: false
- uses: tempoxyz/gh-actions/vendor/dtolnay/rust-toolchain@35019557465e3c38ee3468be171771fd73577584 # 2026-10-20T06-22-38Z-35019557
with:
target: ${{ matrix.target }}
- uses: tempoxyz/gh-actions/vendor/Swatinem/rust-cache@35019557465e3c38ee3468be171771fd73577584 # 2026-10-20T06-22-38Z-35019557
with:
key: ${{ matrix.target }}
- run: cargo build --release --target ${{ matrix.target }}
- run: strip target/${{ matrix.target }}/release/tidx || true
- run: mv target/${{ matrix.target }}/release/tidx ${{ matrix.asset }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ matrix.asset }}
path: ${{ matrix.asset }}
upload:
name: Upload Release Assets
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Secure runner
uses: tempoxyz/gh-actions/actions/secure-runner@35019557465e3c38ee3468be171771fd73577584 # 2026-10-20T06-22-38Z-35019557
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
path: artifacts
merge-multiple: true
pattern: tidx-*
- uses: tempoxyz/gh-actions/actions/gh-release@35019557465e3c38ee3468be171771fd73577584 # 2026-10-20T06-22-38Z-35019557
with:
tag: ${{ inputs.tag || github.ref_name }}
files: artifacts/*
- uses: tempoxyz/gh-actions/actions/gh-release@35019557465e3c38ee3468be171771fd73577584 # 2026-10-20T06-22-38Z-35019557
with:
tag: latest
prerelease: true
files: artifacts/*
body: "Latest build from ${{ inputs.tag || github.ref_name }}. Updated on every release."