-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.76 KB
/
Copy pathrelease.yml
File metadata and controls
67 lines (54 loc) · 1.76 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
name: Release Binaries
on:
push:
tags:
- "v*"
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build-and-upload:
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.runner }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: recached-linux-amd64
- runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
artifact: recached-linux-arm64
- runner: macos-latest
target: x86_64-apple-darwin
artifact: recached-macos-amd64
- runner: macos-14
target: aarch64-apple-darwin
artifact: recached-macos-arm64
- runner: windows-latest
target: x86_64-pc-windows-msvc
artifact: recached-windows-amd64.exe
binary_suffix: .exe
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "recached-release-${{ matrix.target }}"
- name: Build release binary
run: cargo build --release --package server-native --target ${{ matrix.target }}
- name: Upload binary to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/server-native${{ matrix.binary_suffix || '' }}
asset_name: ${{ matrix.artifact }}
tag: ${{ github.ref }}
overwrite: true