| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- name: ci
- on: [push, pull_request]
- jobs:
- build:
- strategy:
- fail-fast: false
- matrix:
- # https://docs.github.com/en/actions/using-github-hosted-runners
- os:
- [
- ubuntu-latest,
- ubuntu-24.04-arm,
- windows-latest,
- windows-11-arm,
- macos-latest,
- macos-15-intel,
- ]
- runs-on: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-go@v6
- with:
- go-version: "1.26"
- - name: Install libx11-dev for clipboard support
- if: runner.os == 'Linux'
- run: sudo apt install libx11-dev
- - name: Test
- run: go test -v ./...
- - name: Lint
- if: runner.os == 'Linux' && runner.arch == 'X64'
- uses: golangci/golangci-lint-action@v8
- with:
- version: latest
- - name: Build
- run: go build -trimpath -ldflags=-s -o discordo-plus .
- - uses: actions/upload-artifact@v6
- if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- with:
- name: discordo-plus_${{ runner.os }}_${{ runner.arch }}
- path: |
- discordo-plus
- discordo-plus.exe
- - name: Send repository dispatch
- if: ${{ runner.os == 'Windows' && github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- env:
- GH_TOKEN: ${{ secrets.PAT }}
- run: |
- gh api --method POST -H "Accept: application/vnd.github+json" -f "event_type=discordo-ci-completed" /repos/vvirtues/bucket/dispatches
|