Skip to content

1.3.0

Compare
Choose a tag to compare
@kristianfreeman kristianfreeman released this 24 Aug 17:25
3424d15

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