Releases: cloudflare/wrangler-action
v3.0.2
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
v3.0.1
Automating Build & Release
What's Changed
- Artifacts are now ESM supported with
.mjs
- Update publish to deploy by @lrapoport-cf in #124
- Automatically add issues to workers-sdk GH project by @lrapoport-cf in #127
- Automate Action Release by @JacobMGEvans in #128
New Contributors
- @lrapoport-cf made their first contribution in #124
Full Changelog: 3.0.0...3.0.1
v3.0.0
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
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 runpublish --env=production
. - This opens up other possibilities too like publishing a Pages project:
pages publish <directory> --project-name=<name>
.
- This allows you to specify the Wrangler command you would like to run.
- New
accountId
input- This allows you to specify your account ID.
Removals
- Removed
publish
input (refer to Breaking changes).
Changes
-- no changes --
Breaking changes
publish
has been removed.- You should instead do
command: publish
.
- You should instead do
next
What's Changed
- Update Readme to reference v1.3.0 by @chromy in #43
- Suggest workflow_dispatch for manual deploys by @Indigenuity in #42
- Update README.md release version by @whoabuddy in #46
- Update Node.js to 16 by @ItalyPaleAle in #56
New Contributors
- @chromy made their first contribution in #43
- @Indigenuity made their first contribution in #42
- @whoabuddy made their first contribution in #46
- @ItalyPaleAle made their first contribution in #56
Full Changelog: 1.3.0...next
1.3.0
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 publish
— preCommands
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
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
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
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
beta4 of wrangler-action
improves the error output when your Cloudflare API key or email are missing