Skip to content

Releases: cloudflare/wrangler-action

v3.0.2

10 Aug 21:47
80501a7
Compare
Choose a tag to compare

Patch Changes

  • #147 58f274b Thanks @JacobMGEvans! - Added more error logging when a command fails to execute
    Previously, we prevented any error logs from propagating too far to prevent leaking of any potentially sensitive information. However, this made it difficult for developers to debug their code.

    In this release, we have updated our error handling to allow for more error messaging from pre/post and custom commands. We still discourage the use of these commands for secrets or other sensitive information, but we believe this change will make it easier for developers to debug their code.

    Relates to #137

  • #147 58f274b Thanks @JacobMGEvans! - Adding Changesets

  • Version 3.0.0

  • Version 2.0.0

v3.0.1

08 Aug 19:27
1c594e8
Compare
Choose a tag to compare

Automating Build & Release

What's Changed

New Contributors

Full Changelog: 3.0.0...3.0.1

v3.0.0

07 Aug 18:12
Compare
Choose a tag to compare

Rewritten Wrangler Action in TypeScript.

Additions

  • Automated Build & Release to CI/CD
  • Bulk secrets API utilization from Wrangler.
  • Added testing for improved reliability.
  • Implemented multiline support for the command input to allow running multiple Wrangler commands.
  • Now using Node for the Action engine/runner.
  • Open discussions with the community on all changes through GitHub Discussions and monitored Issues.

Removals

  • Removed Docker as a dependency.
  • Dropped support for Wrangler v1.
  • Removed Global Token & Email Auth support

Changes

  • Fixed CI/CD issues.

Breaking changes

  • Wrangler v1 is no longer supported.
    • Please update to the latest version of Wrangler.
  • Updated default version of Wrangler to v3.4.0
  • Removed Global Token & Email Auth support

Additional Notes

2.0.0

09 May 12:42
4c10c18
Compare
Choose a tag to compare

Additions

  • New command input
    • This allows you to specify the Wrangler command you would like to run.
      For example, if you want to publish the production version of your Worker you may run publish --env=production.
    • This opens up other possibilities too like publishing a Pages project: pages publish <directory> --project-name=<name>.
  • New accountId input
    • This allows you to specify your account ID.

Removals

Changes

-- no changes --

Breaking changes

  • publish has been removed.
    • You should instead do command: publish.

next

21 Mar 14:52
6f62deb
Compare
Choose a tag to compare
next Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 1.3.0...next

1.3.0

24 Aug 17:25
3424d15
Compare
Choose a tag to compare

wrangler-action 1.3.0 includes two features contributed from @bradyjoslin to achieve more complex Workers workflows inside of GitHub Actions. Thanks Brady!

Changes

Add support for running pre and post commands, disabling publish (#35)

Two new arguments for wrangler-action have been added to enable running tasks inside of the wrangler-action workflow, before wrangler publishpreCommands and postCommands.

jobs:
  deploy:
    steps:
      uses: cloudflare/wrangler-action@1.2.0
      with:
        apiToken: ${{ secrets.CF_API_TOKEN }}
        preCommands: |
          wrangler whoami
          echo "Run before wrangler publish"
        postCommands: |
          echo "Run after wrangler publish"

If you'd like to disable wrangler publish, you can pass a new publish flag, setting it to false. This can be used as seen in the below example to simply build a project without publishing it:

jobs:
  deploy:
    steps:
      uses: cloudflare/wrangler-action@1.2.0
      with:
        apiToken: ${{ secrets.CF_API_TOKEN }}
        preCommands: wrangler build
        publish: false

Updating

You can update your version in your workflow by passing in the tag 1.3.0 in the uses directive:

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    steps:
      - name: Publish
        uses: cloudflare/wrangler-action@1.3.0

1.2.0

22 Jun 15:33
Compare
Choose a tag to compare

wrangler-action 1.2.0 includes two nice improvements for Workers + GitHub Actions users:

Changes

Remove NVM to speed up build time (commit)

Prior versions of wrangler-action included installing NVM. Users have found that this is no longer needed, and can save ~20s of run time on the workflow. Neat!

Thanks to @jasongill for this pull request!

Add support for wrangler secrets (commit)

If you use wrangler secrets, you can now set them as part of your workflow, by specifying matching GitHub secrets:

jobs:
  deploy:
    steps:
      uses: cloudflare/wrangler-action@1.1.0
      with:
        apiToken: ${{ secrets.CF_API_TOKEN }}
        workingDirectory: 'subfoldername'
        secrets: |
            SECRET1
            SECRET2
      env:
        SECRET1: ${{ secrets.SECRET1 }}
        SECRET2: ${{ secrets.SECRET2 }}

Thanks to @bradyjoslin for this pull request!

Updating

You can update your version in your workflow by passing in the tag 1.2.0 in the uses directive:

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    steps:
      - name: Publish
        uses: cloudflare/wrangler-action@1.2.0

📡 1.1.0

09 Dec 18:51
312aaae
Compare
Choose a tag to compare

Version 1.1.0 of wrangler-action includes support for Wrangler's new API token authentication, as well as a few features requested and developed by community members using wrangler-action in their production systems.

To upgrade to wrangler-action 1.1.0, update the uses field in your workflow, passing in the new version of wrangler-action, cloudflare/wrangler-action@1.1.0:

- name: Deploy to Cloudflare Workers with Wrangler
  uses: cloudflare/wrangler-action@1.1.0

Features

Authentication via API tokens

As per cloudflare/wrangler-legacy#471, wrangler-action now supports (and encourages) the use of Cloudflare API tokens. To learn how to generate a new API token, check out our docs!

To use an API token, pass the apiToken input in your workflow to wrangler-action:

name: Deploy

on:
  push:
    branches:
      - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    steps:
      - uses: actions/checkout@master
      - name: Publish
        uses: cloudflare/wrangler-action@1.1.0
        with:
          apiToken: ${{ secrets.CF_API_TOKEN }}

Note that this change deprecates apiKey and email, making them optional parameters. If you use apiKey and email in your project, it will continue to work as you'd expect, but you will receive a notice in the logs that API tokens are preferred. Hooray, security!

Use a specific Wrangler version

If you need to use a specific version of Wrangler with your action, you can now pass in wranglerVersion to your workflow in order to tell NPM to install that specific version.

jobs:
  deploy:
    steps:
      uses: cloudflare/wrangler-action@1.1.0
      with:
        apiToken: ${{ secrets.CF_API_TOKEN }}
        wranglerVersion: '1.6.0'

Working directories

Per #7, wrangler-action now supports a working directory, allowing you to run wrangler-action in a specific directory in your repo. This can be useful for repositories with a Workers application that isn't the top-level of the repository:

jobs:
  deploy:
    steps:
      uses: cloudflare/wrangler-action@1.1.0
      with:
        apiToken: ${{ secrets.CF_API_TOKEN }}
        workingDirectory: 'subfoldername'

Thank you to @fshot for this contribution!

Maintenance

We've included a test directory which contains a full Workers application. We'll use this to dogfood future versions of wrangler-action and new features that we develop.


Thank you to the following folks for review and help on this release: @fshot, @adaptive, @EverlastingBugstopper, @minddust, @victoriabernard92

1.0.0

24 Oct 14:21
Compare
Choose a tag to compare

It's 1.0 of wrangler-action! Interested in deploying your Workers app using GitHub Actions? Check out the README to get started!

wrangler-action beta4

16 Oct 15:37
Compare
Choose a tag to compare

beta4 of wrangler-action improves the error output when your Cloudflare API key or email are missing ⚠️