ci.yml 767 B

12345678910111213141516171819202122232425262728
  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: go build -ldflags "-s -w" .
  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