test releaser #25
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
on: | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: write # needed to write releases | |
name: Build | |
jobs: | |
test-releaser: | |
# runs-on: ubuntu-latest | |
runs-on: macos-latest | |
# strategy: | |
# matrix: | |
# platform: [ubuntu-latest, macos-latest] | |
# runs-on: ${{ matrix.platform }} | |
steps: | |
# - name: Install Dependencies (macOS) | |
# if: runner.os == 'macOS' | |
# run: brew install bash | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.23.x | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags) | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.11.0 | |
# - name: Install Zig | |
# run: | | |
# curl -LO https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz | |
# tar -xf zig-linux-x86_64-0.13.0.tar.xz | |
# sudo mv zig-linux-x86_64-0.13.0 /usr/local/zig | |
# echo 'export PATH=/usr/local/zig:$PATH' >> $GITHUB_ENV | |
# - name: Show compliler env | |
# run: | | |
# go env | |
# gcc --version || echo "No gcc" | |
# clang --version || echo "No clang" | |
# sudo apt-get update && sudo apt-get install -y \ | |
# curl \ | |
# gcc-aarch64-linux-gnu \ | |
# gcc-arm-linux-gnueabi \ | |
# - run: chown -R zig-cache | |
- name: Set env | |
id: set_env | |
run: | | |
echo "sdk_path=$(xcrun --show-sdk-path)" >> $GITHUB_OUTPUT | |
echo "current_dir=$(pwd)" >> $GITHUB_OUTPUT | |
- name: Releaser build | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: v2.6.1 | |
args: build --clean --skip=validate --snapshot --single-target | |
env: | |
GOOS: darwin | |
GOARCH: amd64 | |
ZIG_LOCAL_CACHE_DIR: ${{ steps.set_env.outputs.current_dir }} | |
ZIG_GLOBAL_CACHE_DIR: ${{ steps.set_env.outputs.current_dir }} | |
SDK_PATH: ${{ steps.set_env.outputs.sdk_path }} |