diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml deleted file mode 100644 index 36b9ad180..000000000 --- a/.github/workflows/clippy.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Code quality - -on: - push: - tags: - - 'v*' -env: - CARGO_TERM_COLOR: always -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: cargo login ${CRATES_IO_TOKEN} - working-directory: ./daedalus - env: - CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} - - run: cargo publish - working-directory: ./daedalus diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..d22210e6b --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: Publish to crates.io + +on: + push: + branches: [ master ] + pull_request: +env: + CARGO_TERM_COLOR: always +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + - name: Cache build artifacts + id: cache-build + uses: actions/cache@v2 + with: + path: target/** + key: ${{ runner.os }}-build-cache + - name: Annotate commit with clippy warnings + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d22210e6b..36b9ad180 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,30 +1,19 @@ -name: Publish to crates.io +name: Code quality on: push: - branches: [ master ] - pull_request: + tags: + - 'v*' env: CARGO_TERM_COLOR: always jobs: - lint: + publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - components: rustfmt, clippy - - name: Cache build artifacts - id: cache-build - uses: actions/cache@v2 - with: - path: target/** - key: ${{ runner.os }}-build-cache - - name: Annotate commit with clippy warnings - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features + - uses: actions/checkout@v1 + - run: cargo login ${CRATES_IO_TOKEN} + working-directory: ./daedalus + env: + CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + - run: cargo publish + working-directory: ./daedalus