forked from wasmCloud/weld
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.46 KB
/
codegen.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
name: CODEGEN
on:
push:
branches: [main]
paths:
- "codegen/**"
tags:
- "weld-codegen-v*"
pull_request:
branches: [main]
paths:
- "codegen/**"
env:
CARGO_TERM_COLOR: always
working-directory: ./codegen
jobs:
rust_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: run_all_tests_clippy_fmt
run: |
cd ${{ env.working-directory }}
make test
make rust-check
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: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_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@v1
- id: crates-release-action
uses: wasmcloud/common-actions/crates-release@main
with:
working-directory: ${{ env.working-directory }}
crates-token: ${{ secrets.CRATES_PUBLISH_TOKEN }}