Fixes for Known Errors (#190) #214
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
on: | |
push: | |
branches: | |
- main | |
name: Check Main and Create GitHub Release | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'oscope-release-bot[bot]' && github.event.commits[0].author.name != 'dependabot[bot]' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup update | |
- uses: Swatinem/rust-cache@v2 | |
- name: cargo build | |
run: cargo build | |
- name: cargo check | |
run: cargo check | |
## Cargo test | |
- name: cargo test | |
run: cargo test | |
## Cargo fmt | |
- run: rustup component add rustfmt | |
- name: cargo fmt | |
run: cargo fmt --all -- --check | |
## Cargo clippy | |
- name: cargo clippy | |
run: cargo clippy -- -D warnings | |
cut-release: | |
needs: | |
- check | |
runs-on: ubuntu-latest | |
name: Cut and Release New Version | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.APP_ID }} | |
private-key: ${{ secrets.PRIVATE_KEY }} | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
fetch-depth: 0 | |
- uses: swatinem/rust-cache@v2 | |
- name: Install cargo-release | |
run: cargo install cargo-release@0.25.6 | |
- name: Setup user details | |
run: | | |
git config --global user.email "oscope-release-bot[bot]@users.noreply.github.com" | |
git config --global user.name "oscope-release-bot[bot]" | |
- name: Release latest version | |
run: cargo release --execute --no-confirm --no-verify --no-publish patch | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |