Browse Source

Binstalls not working, need archive suffix

Jonathan Kelley 1 year ago
parent
commit
ac1aea4783
2 changed files with 16 additions and 5 deletions
  1. 9 3
      .github/workflows/publish.yml
  2. 7 2
      packages/cli/Cargo.toml

+ 9 - 3
.github/workflows/publish.yml

@@ -18,8 +18,13 @@ name: Publish CLI
 on:
   workflow_dispatch:
     inputs:
+      post:
+        name: "Release Post"
+        required: true
+        description: Choose the release post to publish with. Must be a tag (eg v0.4.0)
+        type: string
       channel:
-        name: "Branch to publish"
+        name: "CLI Binary Version"
         required: true
         description: Choose the version number to publish with. Must be a tag (ie v0.4.0)
         type: string
@@ -34,6 +39,7 @@ env:
   # SEMVER: ${{ github.event.inputs.channel == 'main' && 'prerelease' || 'patch' }}
   # PRERELEASE_TAG: ${{ github.event.inputs.channel == 'main' && '-pre' || '' }}
   RELEASE_TAG: ${{ github.event.inputs.channel }}
+  RELEASE_POST: ${{ github.event.inputs.post }}
 
 jobs:
   release-cli:
@@ -88,10 +94,10 @@ jobs:
           bin: dx
           token: ${{ secrets.GITHUB_TOKEN }}
           target: ${{ matrix.platform.target }}
-          archive: $bin-$target
+          archive: $bin-$target-v${{ env.RELEASE_TAG }}
           checksum: sha256
           manifest_path: packages/cli/Cargo.toml
-          ref: refs/tags/${{ env.RELEASE_TAG }}
+          ref: refs/tags/${{ env.RELEASE_POST }}
 
 
   # todo: these things

+ 7 - 2
packages/cli/Cargo.toml

@@ -1,6 +1,7 @@
 [package]
 name = "dioxus-cli"
-version = { workspace = true }
+version = "0.5.3"
+# version = { workspace = true }
 authors = ["Jonathan Kelley"]
 edition = "2021"
 description = "CLI tool for developing, testing, and publishing Dioxus apps"
@@ -115,7 +116,11 @@ name = "dx"
 tempfile = "3.3"
 
 [package.metadata.binstall]
-pkg-url = "{ repo }/releases/download/v{ version }/dx-{ target }"
+# temporarily, we're going to use the 0.5.0 download page for all binaries
+pkg-url = "{ repo }/releases/download/v{ version }/dx-{ target }-v{ version }{ archive-suffix }"
+
+# pkg-url = "{ repo }/releases/download/v{ version }/dx-{ target }{ archive-suffix }"
+pkg-fmt = "tgz"
 
 [package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
 pkg-fmt = "zip"