taiki-e / install-action

GitHub Action for installing development tools (mainly from GitHub Releases).
Apache License 2.0
272 stars 32 forks source link

Support just and dprint #33

Closed azzamsa closed 1 year ago

azzamsa commented 1 year ago

Hi.

I have been using install-action across my project's CI. Most of them are just and dprint.

Would you like to support just and dprint? Is falling back to binstall took longer than built-in support crates?

Thanks a lot for insall-action :heart:

NobodyXu commented 1 year ago

Is falling back to binstall took longer than built-in support crates?

It might take a bit longer, but I think it's noticeable since building on GHA takes much longer than that. Besides, GHA has excellent network so downloading is not going to be the bottleneck.

taiki-e commented 1 year ago

27's automatic update mechanism greatly reduces the cost of supporting new tools, so I'm fine to support these once #27 is merged. (I hope to be able to merge it this weekend...)

azzamsa commented 1 year ago

@taiki-e It doesn't work in my side. Do we need to wait for some time? Maybe Github doesn't pick up the latest commit or should I wait for a new release?

From 1660e22a2fdabc6945e0920751723afc639a3815 Mon Sep 17 00:00:00 2001
From: azzamsa <me@azzamsa.com>
Date: Sun, 25 Dec 2022 21:09:01 +0700
Subject: [PATCH] ci: `install-action` finally supports just & dprint

Out of the box.
---
 .github/workflows/ci.yaml | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 724454b..79eb953 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -19,14 +19,10 @@ jobs:
           components: clippy, rustfmt

       - name: Install latest just release
-        uses: taiki-e/install-action@v1
-        with:
-          tool: just
+        uses: taiki-e/install-action@just

       - name: Install latest dprint release
-        uses: taiki-e/install-action@v1
-        with:
-          tool: dprint
+        uses: taiki-e/install-action@dprint

       # - name: Cache
       #   uses: Swatinem/rust-cache@v2
@@ -56,9 +52,7 @@ jobs:
         uses: taiki-e/install-action@nextest

       - name: Install latest just release
-        uses: taiki-e/install-action@v1
-        with:
-          tool: just
+        uses: taiki-e/install-action@just

       - name: Cache
         uses: Swatinem/rust-cache@v2
 Prepare all required actions
Getting action download info
Error: Unable to resolve action `taiki-e/install-action@dprint`, unable to find version `dprint`. Unable to resolve action `taiki-e/install-action@just`, unable to find version `just`
taiki-e commented 1 year ago

Published in 2.0.0.

should I wait for a new release?

Yeah, the @<tool> shorthand will not work until the first release of official support. I now created a new release so it should now work.

azzamsa commented 1 year ago

Worked like a charm!