-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.4 KB
/
cd.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
68
69
name: Continuous Delivery
permissions:
pull-requests: write
contents: write
on:
push:
branches:
- 'main'
env:
CARGO_TERM_COLOR: always
jobs:
create-tag:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Get package tag
run: |
cargo install cargo-get
echo "TAG=v`cargo get package.version`" >> $GITHUB_ENV
echo "tag name ${{ env.TAG }}"
- name: Create tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ env.TAG }}
tag_exists_error: true
message: "Latest release"
build-and-upload:
name: Build and upload
needs: create-tag
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-wasi
components: rustfmt, clippy
- name: Cache dependencies
uses: Swatinem/rust-cache@v2.2.1
- name: Release build
run: cargo build --release
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG }}
files: |
${{ env.ASSET }}