ci.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. name: ci
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. strategy:
  6. fail-fast: false
  7. matrix:
  8. # https://docs.github.com/en/actions/using-github-hosted-runners
  9. os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
  10. runs-on: ${{ matrix.os }}
  11. steps:
  12. - uses: actions/checkout@v4
  13. - uses: actions/setup-go@v5
  14. with:
  15. go-version: stable
  16. - name: Build
  17. run: make
  18. - uses: actions/upload-artifact@v4
  19. if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
  20. with:
  21. name: discordo_${{ runner.os }}_${{ runner.arch }}
  22. path: |
  23. discordo
  24. discordo.exe
  25. - name: Send repository dispatch
  26. if: ${{ runner.os == 'Windows' && github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
  27. env:
  28. GH_TOKEN: ${{ secrets.PAT }}
  29. run: |
  30. gh api --method POST -H "Accept: application/vnd.github+json" -f "event_type=discordo-ci-completed" /repos/vvirtues/bucket/dispatches