Skip to content

macOS static version test v2 #5

macOS static version test v2

macOS static version test v2 #5

Workflow file for this run

name: Build gocryptfs for M1 Mac
on:
push:
branches: [ workflows ]
pull_request:
branches: [ workflows ]
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout gocryptfs
uses: actions/checkout@v3
with:
repository: rfjakob/gocryptfs
ref: master
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Install macOS dependencies
run: |
brew update
brew install openssl pkg-config
- name: Generate go.sum
run: go mod tidy
- name: Get version info
run: |
echo "version=$(git describe --tags --always --dirty)" >> $GITHUB_ENV
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_ENV
- name: Build gocryptfs
run: |
go build -ldflags="-X \"main.GitVersion=${{ env.version }}\" -X \"main.GitVersionFuse=${{ env.version }}\" -X \"main.BuildDate=${{ env.date }}\" -extldflags '-static'" -tags without_openssl -o gocryptfs
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gocryptfs-m1
path: ./gocryptfs