-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 2.15 KB
/
Copy pathbuild-deployer.yaml
File metadata and controls
67 lines (64 loc) · 2.15 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: Build and release Deployer
permissions:
contents: write
on:
release:
types: [published]
jobs:
check-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Check tags
run: |
grep -q "version = \"$version\"" filen-relay/Cargo.toml
grep -q "version = \"$version\"" filen-relay-deployer/Cargo.toml
env:
version: ${{ github.event.release.tag_name }}
build-binaries:
needs: check-tags
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: bash # on windows too
steps:
- uses: actions/checkout@v5
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2026-02-20
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ""
shared-key: cargo-build-release-cli
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install C++ build dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake clang libc++-dev libc++abi-dev
sudo apt-get install musl-tools
- name: Run build
run: cargo build --bin filen-relay-deployer --release --verbose --locked
env:
FILEN_RELAY_VERSION: ${{ github.event.release.tag_name }}
- name: Prepare artifact
run: |
mkdir -p ./artifact
if [[ $platform =~ ^windows.*$ ]]; then
cp ./target/release/filen-relay-deployer.exe ./artifact/filen-relay-deployer-$version-$platform.exe
else
cp ./target/release/filen-relay-deployer ./artifact/filen-relay-deployer-$version-$platform
chmod +x ./artifact/filen-relay-deployer-$version-$platform
fi
env:
version: ${{ github.event.release.tag_name }}
platform: ${{ matrix.platform }}
- name: Attach binaries to release
uses: softprops/action-gh-release@v2
with:
files: artifact/filen-relay-deployer-*