Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo-binstall for Dioxus CLI fails if release tag is not consitent #1430

Closed
1 of 3 tasks
esimkowitz opened this issue Sep 5, 2023 · 2 comments · Fixed by #2755
Closed
1 of 3 tasks

cargo-binstall for Dioxus CLI fails if release tag is not consitent #1430

esimkowitz opened this issue Sep 5, 2023 · 2 comments · Fixed by #2755
Labels
bug Something isn't working ci github ci
Milestone

Comments

@esimkowitz
Copy link
Contributor

esimkowitz commented Sep 5, 2023

Problem

The current release of the Dioxus CLI uses a different release tag naming scheme than that used for the previous GitHub Releases. This breaks the pattern set in the Cargo.toml, meaning cargo-binstall cannot find the binaries and falls back to the standard cargo install procedure.

Steps To Reproduce

Steps to reproduce the behavior:

  • Create a new GitHub Actions workflow with the following:
name: Test cargo-binstall

on:
  push:
    branches: ["main"]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v3
      
      # Install toolchain
      - name: Install Rust Toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          targets: wasm32-unknown-unknown
      - name: Install Dioxus CLI
        uses: taiki-e/install-action@v1
        with:
          tool: [email protected]
  • Check this into the main branch of a dummy repository and the action should automatically run
  • You will see that rather than install the pre-built binaries, the action compiles from source code.

Expected behavior

When running cargo-binstall or a GitHub Action like taiki-e/install-action which uses cargo-binstall under the hood to install Dioxus CLI v0.4.1 or later, the pre-built binaries should be installed rather than re-compiling the CLI from source.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment:

  • Dioxus version: v0.4.1
  • Rust version: 1.71.0
  • OS info: Ubuntu 22.04
  • App platform: web

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
@esimkowitz
Copy link
Contributor Author

To get around this, the Build CLI for release workflow could update the value of the pkg-url with the exact title of the release, rather than using a pattern. It could then commit that change back to the release tag.

@esimkowitz
Copy link
Contributor Author

I have a potential fix ready: #1431

@ealmloff ealmloff added bug Something isn't working ci github ci labels Sep 5, 2023
@jkelleyrtp jkelleyrtp added this to the 0.6.0 milestone Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci github ci
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants