Maybe release #29055
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: Maybe release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 14 * * *' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.node-version' | |
cache: 'pnpm' | |
- run: pnpm i | |
- name: Generate new data | |
run: pnpm run generate | |
- name: Commit changes if necessary | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "feat(data): Automatic data update" | |
# Optional glob pattern of files which should be added to the commit | |
file_pattern: raw-time-zones.json time-zones-names.json | |
- name: Release if necessary | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' | |
run: npx semantic-release | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |