zip.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: zip
  2. on:
  3. pull_request:
  4. paths:
  5. - 'ZipBuilder/**'
  6. - '.github/workflows/zip.yml'
  7. # Don't run based on any markdown only changes.
  8. - '!ZipBuilder/*.md'
  9. schedule:
  10. # Run every day at midnight(PST) - cron uses UTC times
  11. - cron: '0 8 * * *'
  12. jobs:
  13. build:
  14. runs-on: macOS-latest
  15. steps:
  16. - uses: actions/checkout@v2
  17. - name: Build
  18. run: |
  19. cd ZipBuilder
  20. swift build -v
  21. package:
  22. needs: build
  23. runs-on: macOS-latest
  24. # Only run the `package` job for the cron job, not PRs.
  25. if: github.event_name == 'schedule'
  26. steps:
  27. - uses: actions/checkout@v2
  28. - name: Setup Bundler
  29. run: ./scripts/setup_bundler.sh
  30. - name: ZipBuildingTest
  31. run: |
  32. mkdir -p zip_output_dir
  33. sh -x scripts/build_zip.sh zip_output_dir
  34. - uses: actions/upload-artifact@v1
  35. with:
  36. name: Firebase-actions-dir
  37. # Zip the entire output directory since the builder adds subdirectories we don't know the
  38. # name of.
  39. path: zip_output_dir