-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (57 loc) · 1.56 KB
/
Copy pathrelease_main.yml
File metadata and controls
66 lines (57 loc) · 1.56 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
name: Build and Release Stable
on:
push:
# complemented with branch protection on main this will
# run on any pull request merge
branches: main
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions-rs/toolchain@v1
with:
profile: minimal
target: armv7-unknown-linux-gnueabihf
toolchain: stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release2-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target armv7-unknown-linux-gnueabihf --release
- name: Upload
uses: actions/upload-artifact@v4
with:
name: book-safe
path: target/armv7-unknown-linux-gnueabihf/release/book-safe
- name: get package version and tag.
id: version_tag
uses: dante-signal31/rust-app-version@v1.2.0
outputs:
package_tag: ${{ steps.version_tag.outputs.app_version }}
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download binaries
uses: actions/download-artifact@v4
with:
name: book-safe
- name: Release
uses: "softprops/action-gh-release@v1"
with:
prerelease: true
name: "Stable"
files: book-safe
tag_name: ${{needs.build.outputs.package_tag}}