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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
on:
push:
branches:
- master
name: Release
permissions:
contents: read
jobs:
release:
environment: Publish
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install Node Dependencies
run: |
npm install @semantic-release/commit-analyzer \
@semantic-release/release-notes-generator \
@semantic-release/changelog \
@semantic-release/github \
@semantic-release/git \
@semantic-release/exec
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: "Install cargo-llvm-cov"
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate line code coverage
run: cargo llvm-cov test --ignore-filename-regex "src/single/tuple.rs" --html
- name: Generate summery code coverage
run: cargo llvm-cov report --summary-only --ignore-filename-regex "src/single/tuple.rs" --json --output-path lcov.info
- name: Install Toml Edit
run: cargo install toml-cli
- name: Release Build
run: cargo build --release
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: npx semantic-release
# TODO(Alec): Upload test results to the release
# Then we can download them in our PR's to compare master
# on:
# pull_request:
# types:
# - closed
# jobs:
# if_merged:
# if: github.event.pull_request.merged == true
# runs-on: ubuntu-latest
# steps:
# - name: Download PR summery test artifact
# uses: actions/download-artifact@v3
# with:
# name: ${{ github.event.number }}-test-summery
# path: new-master-lcov.info
# - name: Upload PR summery test artifact as master
# uses: actions/upload-artifact@v3
# with:
# name: master-test-summery
# path: new-master-lcov.info