|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: '1.20'
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
go build -o main.exe -v ./main.go
|
|
|
|
- name: Create a new directory and copy files
|
|
|
|
run: |
|
|
|
|
mkdir -p alac
|
|
|
|
cp agent.js alac/
|
|
|
|
cp config.yaml alac/
|
|
|
|
cp README.md alac/
|
|
|
|
cp main.exe alac/
|
|
|
|
- name: Upload apple-music-alac-atmos-downloader
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: apple-music-alac-atmos-downloader-windows
|
|
|
|
path: alac/*
|
|
|
|
|
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: '1.20'
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
go build -o main -v ./main.go
|
|
|
|
- name: Create a new directory and copy files
|
|
|
|
run: |
|
|
|
|
mkdir -p alac
|
|
|
|
cp agent.js alac/
|
|
|
|
cp config.yaml alac/
|
|
|
|
cp README.md alac/
|
|
|
|
cp main alac/
|
|
|
|
- name: Upload apple-music-alac-atmos-downloader
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: apple-music-alac-atmos-downloader-linux
|
|
|
|
path: alac/*
|