cloudflare / wrangler-action

🧙‍♀️ easily deploy cloudflare workers applications using wrangler and github actions
Apache License 2.0
1.26k stars 159 forks source link

use wrangler version from package.json #231

Closed wydengyre closed 6 months ago

wydengyre commented 10 months ago

It should be possible to tell the action to get the wrangler version from package.json dependencies. I'd even say that is sensible default behavior.

ludeeus commented 8 months ago

As a workaround for that, you can read it in a separate step and reuse that value with something like this:

...
      - name: Set wrangler version
        id: wrangler
        run: echo "version=$(jq -r .devDependencies.wrangler package.json | cut -c2-)" >> "$GITHUB_OUTPUT"
...
      - name: Build something awesome
        uses: cloudflare/wrangler-action@v3.4.1
        with:
          ...
          wranglerVersion: ${{ steps.wrangler.outputs.version }}
AdiRishi commented 6 months ago

This issue is resolved as of cloudflare/wrangler-action@v3.6.0.