-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.19 KB
/
build-macOS.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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