Skip to content

Commit

Permalink
chore: Update CD
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Jun 30, 2024
1 parent b8ce1ef commit 682b55f
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 48 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CD

on:
push:
branches: [ master ]
tags:
- "v*"
pull_request:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly

steps:
- uses: actions/checkout@v2

- name: Install Rust toolchain
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add clippy rustfmt

- name: Build
run: cargo build --verbose

- name: Test
run: cargo test --no-fail-fast --verbose

- name: Format check
run: cargo fmt --all --check --verbose --message-format=human

- name: Clippy
run: cargo clippy -- -D warnings

- name: Publish dry-run
run: cargo publish --dry-run

publish:
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Install Rust toolchain
run: rustup update stable && rustup default stable

- name: Publish
run: cargo publish --package dota-gsi --verbose
48 changes: 0 additions & 48 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 682b55f

Please sign in to comment.