canary-release workflow (parcel-bundler/parcel)
The canary-release workflow from parcel-bundler/parcel, explained and optimized by Latchkey.
A
CI health: A - excellent
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the canary-release workflow from the parcel-bundler/parcel repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
workflow (.yml)
# This workflow builds and releases all packages on the main branch with a canary
# dist tag. These packages contain changes that are not yet available in a publicly
# released version of Parcel.
name: canary-release
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build-and-release:
name: Build and release canary
uses: ./.github/workflows/release.yml
secrets: inherit
with:
profile: canary
release-command: |
yarn canary:release --summary-file
node scripts/tag-release.mjs --tag nightly
type: canary
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
# This workflow builds and releases all packages on the main branch with a canary # dist tag. These packages contain changes that are not yet available in a publicly # released version of Parcel. name: canary-release on: schedule: - cron: '0 0 * * *' workflow_dispatch: jobs: build-and-release: timeout-minutes: 30 name: Build and release canary uses: ./.github/workflows/release.yml secrets: inherit with: profile: canary release-command: | yarn canary:release --summary-file node scripts/tag-release.mjs --tag nightly type: canary
What changed
- Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.