Daily Release #298
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: Daily Release | |
| on: | |
| schedule: | |
| # Run at 00:30 UTC every day | |
| - cron: '30 0 * * *' | |
| # Allow manual triggering for testing | |
| workflow_dispatch: | |
| jobs: | |
| update-compatibility-date: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.DEVPROD_PAT }} | |
| ref: main | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
| - name: Update compatibility date | |
| run: | | |
| echo "${{ steps.date.outputs.date }}" > src/workerd/io/supported-compatibility-date.txt | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| if [[ $(git status --porcelain src/workerd/io/supported-compatibility-date.txt) ]]; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| fi | |
| echo "last_email=$(git show --format="%ae" -s)" >> $GITHUB_OUTPUT | |
| # Publish new version if compatibility-date changed and last commit wasn't a daily release | |
| # already. | |
| - name: Commit and push change | |
| if: steps.git-check.outputs.changed == 'true' && steps.git-check.outputs.last_email != 'workers-devprod@cloudflare.com' | |
| run: | | |
| git config user.email "workers-devprod@cloudflare.com" | |
| git config user.name "Workers DevProd" | |
| git add src/workerd/io/supported-compatibility-date.txt | |
| git commit -m "Release ${{ steps.date.outputs.date }}" | |
| git push |