-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.87 KB
/
build-nightly-release.yaml
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 & Publish Nightly Release
on:
push:
branches:
- 'master'
env:
CARGO_TERM_COLOR: always
NIGHTLY_RELEASE_DIR: build/release
jobs:
build-nightly-release:
runs-on: ${{ matrix.os }}
env:
RUST_BACKTRACE: full
strategy:
fail-fast: false
matrix:
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin]
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
steps:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install stable
rustup default stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
- name: Install cross
run: |
cargo install cross
- name: Checkout
uses: actions/checkout@v4
- name: Build ${{ matrix.target }}
timeout-minutes: 120
run: |
cross build --target ${{ matrix.target }} --release
- name: Prepare release
run: |
LURK_VERSION=$(grep -E '^version' Cargo.toml | awk '{print $3}' | sed 's/"//g')
LURK_RELEASE_NAME=lurk-v${LURK_VERSION}-nightly-${{ matrix.target }}
mkdir -p ${{ env.NIGHTLY_RELEASE_DIR }}
mv target/${{ matrix.target }}/release/lurk ${{env.NIGHTLY_RELEASE_DIR}}/${LURK_RELEASE_NAME}
- name: Upload Nightly Release Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ env.NIGHTLY_RELEASE_DIR }}/*
prerelease: true
tag_name: nightly