Nightly Releases #750
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Releases | |
| # Cron scheduling | |
| # ┌───────────── minute (0 - 59) | |
| # │ ┌───────────── hour (0 - 23) | |
| # │ │ ┌───────────── day of the month (1 - 31) | |
| # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
| # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
| # │ │ │ │ │ | |
| # │ │ │ │ │ | |
| # │ │ │ │ │ | |
| # * * * * * | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| package: | |
| description: 'Specific package to publish (e.g., @faustwp/cli). Leave empty for all.' | |
| required: false | |
| default: '' | |
| schedule: | |
| # Monday-Friday at 8:35pm UTC / 3:35pm CST | |
| # Uses the 35th minute because GitHub Workflow load is significantly | |
| # increased at the start of the hour. By invoking the workflow in the | |
| # middle of the hour, there is less chance of delay. | |
| - cron: '35 20 * * 1-5' | |
| permissions: | |
| contents: read # For checking out the repo | |
| id-token: write # For npm OIDC authentication | |
| jobs: | |
| release_nightly_canary: | |
| if: github.repository_owner == 'wpengine' | |
| name: Release Nightly Canary | |
| # https://github.com/atlassian/changesets/blob/master/docs/snapshot-releases.md | |
| uses: ./.github/workflows/npm-publish.yml | |
| with: | |
| pre-build-command: npm run version:nightly | |
| publish-command: ${{ inputs.package && format('npm publish -w {0} --tag canary', inputs.package) || 'changeset publish --tag canary' }} |