Avoid zig for Darwin build #16
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 | |
# run only on tags | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
id-token: write # needed for federation | |
contents: write # needed to write releases | |
jobs: | |
release: | |
if: github.ref_type == 'tag' | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0 | |
- uses: goto-bus-stop/setup-zig@7ab2955eb728f5440978d5824358023be3a2802d | |
- name: Fix zig-cache permissions | |
run: | | |
mkdir ${{ env.ZIG_USE_GLOBAL_CACHE_DIR }} | |
sudo chown -R $(whoami):$(id -u) ${{ env.ZIG_USE_GLOBAL_CACHE_DIR }} | |
env: | |
ZIG_USE_GLOBAL_CACHE_DIR: $HOME/zig-cache | |
- name: Set output | |
id: macos_sdk | |
run: echo "path=$(xcrun --show-sdk-path)" >> $GITHUB_OUTPUT | |
- name: Install yara | |
run: | | |
brew install yara | |
- uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 | |
with: | |
version: ~> v2 | |
args: release --clean --verbose | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SDK_PATH: ${{ steps.macos_sdk.outputs.path }} | |
VERSION: ${{ github.ref_name }} | |
ZIG_USE_GLOBAL_CACHE_DIR: $HOME/zig-cache |