fix: added mac release #35
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Install cross-compilation tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
gcc g++ make \ | |
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ | |
gcc-mingw-w64 g++-mingw-w64 \ | |
mingw-w64 | |
# Install osxcross for macOS cross-compilation | |
mkdir -p /tmp/osxcross | |
cd /tmp/osxcross | |
wget https://github.com/tpoechtrager/osxcross/archive/master.zip | |
unzip master.zip | |
cd osxcross-master | |
wget -P tarballs https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz | |
UNATTENDED=1 ./build.sh | |
echo "OSXCROSS_ROOT=/tmp/osxcross/osxcross-master/target" >> $GITHUB_ENV | |
echo "/tmp/osxcross/osxcross-master/target/bin" >> $GITHUB_PATH | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CGO_ENABLED: 1 |