-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (71 loc) · 2.11 KB
/
ci.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
68
69
70
71
72
73
74
75
name: CI
on:
pull_request:
push:
branches:
- 'main'
tags:
- "v[0-9]+.[0-9]+.[0-9]+**"
env:
RUSTFLAGS: -D warnings
jobs:
check:
name: Check
runs-on: ubuntu-latest
container:
image: ghcr.io/vita-rust/vitasdk-rs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "`cargo check`"
run: cargo hack check -Z build-std=std,panic_abort --feature-powerset --examples --bins --tests --target armv7-sony-vita-newlibeabihf
- name: "`cargo clippy`"
run: cargo hack clippy -Z build-std=std,panic_abort --feature-powerset --examples --bins --tests --target armv7-sony-vita-newlibeabihf
- name: Run cargo doc
run: DOCS_RS=1 RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --target armv7-sony-vita-newlibeabihf -Z build-std
- name: Upload docs
uses: actions/upload-artifact@v3
with:
name: docs
path: target/armv7-sony-vita-newlibeabihf/doc
if-no-files-found: error
release:
if: startsWith(github.ref, 'refs/tags/v')
name: GitHub Release
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configurationJson: |
{
"tag_resolver": {
"pattern": "v(.+)"
}
}
- name: GH Release
uses: softprops/action-gh-release@v1
with:
body: ${{steps.github_release.outputs.changelog}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
if: startsWith(github.ref, 'refs/tags/v')
name: Publish to crates.io
runs-on: ubuntu-latest
needs: check
container:
image: ghcr.io/vita-rust/vitasdk-rs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: publish
run: cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}