macOS automated back on #2
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: 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 install openssl pkg-config | |
- name: Generate go.sum | |
run: go mod tidy | |
- name: Get version info | |
run: echo "version=$(git describe --tags HEAD)" >> $GITHUB_ENV | |
- name: Build gocryptfs | |
run: | | |
cd cmd/gocryptfs | |
go build -ldflags "-X github.com/rfjakob/gocryptfs/v2/internal/configfile.GitVersion=${{ env.version }} -X github.com/rfjakob/gocryptfs/v2/internal/configfile.GitVersionFuse=${{ env.version }} -X github.com/rfjakob/gocryptfs/v2/internal/configfile.BuildDate=$(date +%Y-%m-%d)" -o gocryptfs | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gocryptfs-m1 | |
path: ./cmd/gocryptfs/gocryptfs |