From 180643d92e6120befeb2eeb571730c2d5bb487ee Mon Sep 17 00:00:00 2001 From: Max Thomson Date: Thu, 12 Oct 2023 21:50:28 -0700 Subject: [PATCH 1/4] [CI] Fix ci by updating lockfile --- .github/workflows/release.yml | 4 ++-- Cargo.lock | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4691aa5..14ef295 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Build & Release on: push: - branches: ["master"] + branches: ["master", "max/fix-ci"] permissions: contents: write @@ -74,7 +74,7 @@ jobs: name: Release runs-on: ubuntu-22.04 needs: build - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/DOESNOTEXIST' steps: - name: Checkout code uses: actions/checkout@v3 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", From 9e304635b5830d056bc8e3929857c0aa144db8fc Mon Sep 17 00:00:00 2001 From: Max Thomson Date: Thu, 12 Oct 2023 22:00:28 -0700 Subject: [PATCH 2/4] Remove Duplicate CI runs When pushing to a PR branch, two CI jobs are running. One for the push, and one for the pull_request. We don't want this because dups bad, but also some actions aren't happy if ran twice. Anyways, congrats for actually reading a commit message, ya legend! --- .github/workflows/ci.yml | 41 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 21 deletions(-) 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 From 5996bc3bdb4d85e931657f08c7d4fbb398010b87 Mon Sep 17 00:00:00 2001 From: Max Thomson Date: Thu, 12 Oct 2023 22:10:23 -0700 Subject: [PATCH 3/4] Reorder release workflow steps --- .github/workflows/release.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14ef295..36d3d90 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,14 @@ 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' From 911b90ab4f37b4016b2e0575351c4eb88c83c56e Mon Sep 17 00:00:00 2001 From: Max Thomson Date: Thu, 12 Oct 2023 22:17:25 -0700 Subject: [PATCH 4/4] Revert initial commit to view output of build workflow --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36d3d90..f58154c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Build & Release on: push: - branches: ["master", "max/fix-ci"] + branches: ["master"] permissions: contents: write @@ -74,7 +74,7 @@ jobs: name: Release runs-on: ubuntu-22.04 needs: build - if: github.ref == 'refs/heads/DOESNOTEXIST' + if: github.ref == 'refs/heads/master' steps: - name: Checkout code uses: actions/checkout@v3 @@ -105,7 +105,6 @@ jobs: echo "SHOULD_RELEASE=yes" >> $GITHUB_ENV fi - - name: Download binaries uses: actions/download-artifact@v3 if: env.SHOULD_RELEASE == 'yes'