-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.38 KB
/
release.yml
File metadata and controls
58 lines (48 loc) · 1.38 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
name: Build and Release
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build release binary
run: |
cargo build --release
ls -la target/release/
- name: Rename executable
run: |
cp target/release/opacity-cli target/release/opacity-cli-linux-amd64
ls -la target/release/
- name: Create or update "latest" release
uses: ncipollo/release-action@v1
with:
artifacts: target/release/opacity-cli-linux-amd64
tag: latest
name: Latest Release
body: |
Latest automated build of opacity-cli for x86_64 Linux
## Build Info
- Commit: ${{ github.sha }}
- Branch: ${{ github.ref_name }}
- Build Date: ${{ github.event.head_commit.timestamp }}
allowUpdates: true
replacesArtifacts: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}