Skip to content

Commit e1ea4ea

Browse files
committed
wip: add release yaml
1 parent 23cefa6 commit e1ea4ea

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Release
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}
11+
12+
env:
13+
RUST_BACKTRACE: 1
14+
15+
jobs:
16+
get-next-version:
17+
uses: semantic-release-action/next-release-version/.github/workflows/next-release-version.yml@v4
18+
19+
build:
20+
name: Build
21+
runs-on: ubuntu-latest
22+
needs:
23+
- get-next-version
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Install semantic-release-cargo
30+
if: needs.get-next-version.outputs.new-release-published == 'true'
31+
uses: EricCrosson/install-github-release-binary@v2
32+
with:
33+
targets: semantic-release-cargo@2
34+
35+
- name: Prepare semantic-release for Rust
36+
if: needs.get-next-version.outputs.new-release-published == 'true'
37+
run: semantic-release-cargo prepare ${{ needs.get-next-version.outputs.new-release-version }}
38+
39+
- name: Install Rust toolchain
40+
uses: dtolnay/rust-toolchain@master
41+
42+
- name: Cargo test
43+
run: cargo test
44+
45+
- name: Cargo build
46+
run: cargo build --release --target=x86_64-unknown-linux-gnu --all-targets

0 commit comments

Comments
 (0)