diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e4956d..a435160 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,36 +1,35 @@ name: CI -on: [push, pull_request] + +on: + push: + branches: ["master"] + pull_request: jobs: clippy: + name: Clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - override: true - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - run: cargo clippy -- -D warnings + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Rust env + uses: ./.github/actions/setup-rust-env + + - name: Rust clippy + run: cargo clippy -- -D warnings rustfmt: runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v3 - - name: Install stable toolchain with rustfmt available - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - components: rustfmt + - name: Setup Rust env + uses: ./.github/actions/setup-rust-env - - run: cargo fmt --check + - name: Rust fmt + run: cargo fmt --check test: name: Test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4691aa5..f58154c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,12 +81,6 @@ jobs: with: fetch-depth: 2 - - name: Download binaries - uses: actions/download-artifact@v3 - with: - name: built-binaries - path: bin - - name: Check if release should be created shell: bash run: | @@ -111,6 +105,13 @@ jobs: echo "SHOULD_RELEASE=yes" >> $GITHUB_ENV fi + - name: Download binaries + uses: actions/download-artifact@v3 + if: env.SHOULD_RELEASE == 'yes' + with: + name: built-binaries + path: bin + - name: Publish release uses: softprops/action-gh-release@v1 if: env.SHOULD_RELEASE == 'yes' diff --git a/Cargo.lock b/Cargo.lock index 0686d93..9ca2f7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -260,7 +260,6 @@ name = "htmx-lsp" version = "0.1.0" dependencies = [ "anyhow", - "cc", "clap", "htmx-lsp-server", "htmx-lsp-util",