fix workflows #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Qusic | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go-version: ["1.22.x"] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
arch: [amd64, arm64] # Add ARM64 architecture | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Get dependencies | |
run: sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libx11-dev xorg-dev libwayland-dev libxkbcommon-dev bc | |
if: ${{ runner.os == 'Linux' }} | |
- name: Install Homebrew (macOS) | |
run: | | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
if : ${{ runner.os == 'macOS' }} | |
- name: Install Opus (macOS) | |
run: brew install opus | |
if : ${{ runner.os == 'macOS' }} | |
- name: Build | |
run: go build -v | |
- name: Upload Go build results linux | |
uses: actions/upload-artifact@v3 | |
if: ${{ runner.os == 'Linux' && matrix.arch == 'amd64' }} | |
with: | |
name: Qusic-AMD64-Linux.zip | |
path: qusic | |
- name: Upload Go build results arm64-linux | |
uses: actions/upload-artifact@v3 | |
if: ${{ runner.os == 'Linux' && matrix.arch == 'arm64' }} | |
with: | |
name: Qusic-ARM64-Linux.zip | |
path: qusic | |
- name: Upload Go build results windows | |
uses: actions/upload-artifact@v3 | |
if: ${{ runner.os == 'Windows' && matrix.arch == 'amd64' }} | |
with: | |
name: Qusic-AMD64-Windows.zip | |
path: qusic.exe | |
- name: Upload Go build results arm64-windows | |
uses: actions/upload-artifact@v3 | |
if: ${{ runner.os == 'Windows' && matrix.arch == 'arm64' }} | |
with: | |
name: Qusic-ARM64-Windows.zip | |
path: qusic.exe | |
- name: Upload Go build results macos | |
uses: actions/upload-artifact@v3 | |
if: ${{ runner.os == 'macOS' && matrix.arch == 'amd64' }} | |
with: | |
name: Qusic-AMD64-macOS.zip | |
path: qusic | |
- name: Upload Go build results arm64-macos | |
uses: actions/upload-artifact@v3 | |
if: ${{ runner.os == 'macOS' && matrix.arch == 'arm64' }} | |
with: | |
name: Qusic-ARM64-macOS.zip | |
path: qusic |