Converted repo from an umbrella to just vita-newlib-shims (#4) #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 check --all-targets --all-features | |
- name: "`cargo clippy`" | |
run: cargo clippy --all-targets --all-features | |
- 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@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- 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 }} |