-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.67 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (48 loc) · 1.67 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
name: release
# Builds + uploads prebuilt binaries to a GitHub Release on every `v*` tag.
# taiki-e/upload-rust-binary-action handles cross-compilation (uses `cross`
# for aarch64 linux under the hood), stripping, tar.gz packaging, and asset
# upload. Assets are named like `iceberg-diff-<target>.tar.gz`.
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Tag to build (must already exist)"
required: true
permissions:
contents: write # needed to attach assets to the release
jobs:
upload-assets:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag || github.ref }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: release-${{ matrix.target }}
- uses: taiki-e/upload-rust-binary-action@v1
with:
# Only the user-facing binary. `gen_fixture` is a maintainer tool.
bin: iceberg-diff
target: ${{ matrix.target }}
# Archive name: iceberg-diff-<target>.tar.gz
archive: iceberg-diff-$target
token: ${{ secrets.GITHUB_TOKEN }}
# Attach to the tag that triggered us (or the manual-dispatch tag).
ref: refs/tags/${{ github.event.inputs.tag || github.ref_name }}