-
Notifications
You must be signed in to change notification settings - Fork 5
33 lines (30 loc) · 898 Bytes
/
build.yml
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
name: build
on:
push:
branches:
- develop
- release
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Update Rust
run: rustup update stable
- name: Build release artifacts
run: cargo install --locked --path . --root ./out
# https://github.com/actions/upload-artifact/issues/38 is still not fixed.
- name: Package the binary
run: |
cd out/bin/
zip camo.zip camo
- name: Get the built version number
id: version_number
run: echo "version=$(out/bin/camo --version | awk -F ' ' '{print $2}')" >> $GITHUB_OUTPUT
- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: camo-${{ steps.version_number.outputs.version }}-linux-amd64
path: out/bin/camo.zip