beta.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: beta
  2. on:
  3. push:
  4. branches: [dev]
  5. pull_request:
  6. types: [opened, synchronize, labeled, unlabeled]
  7. jobs:
  8. sync:
  9. if: |
  10. github.event_name == 'push' ||
  11. (github.event_name == 'pull_request' &&
  12. contains(github.event.pull_request.labels.*.name, 'contributor'))
  13. runs-on: blacksmith-4vcpu-ubuntu-2404
  14. permissions:
  15. contents: write
  16. pull-requests: read
  17. actions: write
  18. steps:
  19. - name: Checkout repository
  20. uses: actions/checkout@v4
  21. - name: Setup Bun
  22. uses: ./.github/actions/setup-bun
  23. - name: Configure Git
  24. run: |
  25. git config user.name "github-actions[bot]"
  26. git config user.email "github-actions[bot]@users.noreply.github.com"
  27. - name: Sync beta branch
  28. env:
  29. GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  30. run: bun script/beta.ts
  31. - name: Trigger publish workflow
  32. env:
  33. GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  34. run: gh workflow run publish.yml --ref beta