put exports into GITHUB_ENV so next steps see it #3
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 macOS arm64 | |
on: | |
push: | |
paths-ignore: | |
- "*.md" | |
jobs: | |
build: | |
strategy: | |
fail-fast: true | |
matrix: | |
go: | |
- "1.21" | |
- "1.22" | |
runs-on: macos-latest | |
steps: | |
- name: Library dependencies | |
run: brew install mpv | |
- uses: actions/checkout@v4 | |
- name: Install Go ${{ matrix.go }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Get Go deps | |
run: go get . | |
- name: Export paths | |
run: | | |
echo "export C_INCLUDE_PATH=/usr/local/include:/opt/homebrew/include:$C_INCLUDE_PATH" >> $GITHUB_ENV | |
echo "export LIBRARY_PATH=/usr/local/lib:/opt/homebrew/lib:$LIBRARY_PATH" >> $GITHUB_ENV | |
echo "export CGO_CFLAGS=\"-I/usr/local/include -I/opt/homebrew/include\"" >> $GITHUB_ENV | |
echo "export CGO_LDFLAGS=\"-L/usr/local/lib -L/opt/homebrew/lib\"" >> $GITHUB_ENV | |
- name: Compile | |
run: go build |