This repository was archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
61 lines (56 loc) · 1.56 KB
/
Copy pathhttpserver-lib.yml
File metadata and controls
61 lines (56 loc) · 1.56 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
59
60
61
name: HTTPSERVER_LIB
on:
push:
branches: [main]
paths:
- "httpserver-rs/**"
tags:
- "wasmcloud-provider-httpserver-v*"
pull_request:
branches: [main]
paths:
- "httpserver-rs/**"
env:
CARGO_TERM_COLOR: always
working-directory: ./httpserver-rs
jobs:
rust_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: run_all_tests_clippy_fmt
working-directory: ${{ env.working-directory }}
run: |
make test
rustfmt --edition 2021 --check src/*.rs tests/*.rs
cargo clippy --all
github_release:
if: startswith(github.ref, 'refs/tags/') # Only run on tag push
needs: rust_test
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
draft: false
prerelease: true
crates_release:
if: startswith(github.ref, 'refs/tags/') # Only run on tag push
needs: github_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: crates-release-action
uses: wasmcloud/common-actions/crates-release@main
with:
working-directory: ${{ env.working-directory }}
crates-token: ${{ secrets.CRATES_PUBLISH_TOKEN }}