-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (56 loc) · 1.47 KB
/
release.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
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: Release
on:
push:
tags:
- "release-v*"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
# Check Code style quickly by running `rustfmt` over all code
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
build_and_test:
name: Build project and run all unit AND integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install wasm-tools
run: |
cargo install wasm-tools
- name: Build
run: |
cargo build --verbose --release
- name: Run tests
run: cargo test --verbose
release:
name: Release a new version of orca
needs: [ rustfmt, build_and_test ]
runs-on: ubuntu-latest
permissions:
# Gives write permisison to commit toml changes
contents: write
steps:
- name: cargo login
run: cargo login ${{ secrets.ORCA_API_TOKEN }}
- uses: actions/checkout@v4
- name: Bump Version
id: bump
uses: tj-actions/cargo-bump@v3
with:
release_type: 'patch'
- name: Commit updated toml
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Version Bump
file_pattern: 'Cargo.toml'
branch: main
- name: cargo publish
run: cargo publish