docs(readme): add download shield and fix spelling #37
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: Coverage, Versioning & Deployment | |
on: | |
push: | |
branches: | |
- main | |
# Only allow one release workflow to execute at a time, since each release | |
# workflow uses shared resources (git tags, package registries) | |
concurrency: | |
group: ${{ github.workflow }} | |
jobs: | |
get-next-version: | |
name: "Get Next Version" | |
uses: semantic-release-action/next-release-version/.github/workflows/next-release-version.yml@v4 | |
coverage: | |
name: "Unit Test Coverage" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libssl-dev pkg-config cmake | |
rustup component add llvm-tools-preview | |
cargo install cargo-llvm-cov | |
- name: Run cargo llvm-cov | |
run: | | |
cargo llvm-cov --ignore-filename-regex main.rs --lcov --output-path target/lcov.info --workspace | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./target/lcov.info | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
versioning: | |
name: "Versioning & Crates.io Deployment" | |
runs-on: ubuntu-latest | |
needs: | |
- get-next-version | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
if: needs.get-next-version.outputs.new-release-published == 'true' | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Prepare semantic-release for Rust | |
if: needs.get-next-version.outputs.new-release-published == 'true' | |
run: | | |
cargo install semantic-release-cargo | |
semantic-release-cargo prepare ${{ needs.get-next-version.outputs.new-release-version }} | |
cargo login ${{ secrets.CARGO_TOKEN }} | |
cargo publish --allow-dirty | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.10' | |
- name: Install Dependencies | |
run: npm install | |
- name: Semantic Release | |
run: npx semantic-release --repository-url https://github.com/Jamesmallon1/solana-block-cacher.git | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |