-
Notifications
You must be signed in to change notification settings - Fork 51
106 lines (87 loc) · 2.75 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File generated by `go run ./internal/cmd/ghgen`; DO NOT EDIT.
name: macos
on:
push:
branches:
- "release/**"
- "fullbuild"
- "macosbuild"
tags:
- "v*"
schedule:
- cron: "17 1 * * *"
jobs:
build_darwin_cli:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get GOVERSION content
id: goversion
run: echo "version=$(cat GOVERSION)" >> "$GITHUB_OUTPUT"
- uses: magnetikonline/action-golang-cache@v4
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-macos-${{ steps.goversion.outputs.version }}"
- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make CLI/darwin
- uses: actions/upload-artifact@v3
with:
name: ooniprobe-darwin-amd64
path: ./CLI/ooniprobe-darwin-amd64
- uses: actions/upload-artifact@v3
with:
name: ooniprobe-darwin-arm64
path: ./CLI/ooniprobe-darwin-arm64
- uses: actions/upload-artifact@v3
with:
name: miniooni-darwin-amd64
path: ./CLI/miniooni-darwin-amd64
- uses: actions/upload-artifact@v3
with:
name: miniooni-darwin-arm64
path: ./CLI/miniooni-darwin-arm64
test_darwin_cli:
runs-on: macos-12
needs: build_darwin_cli
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: ooniprobe-darwin-amd64
- run: chmod +x ooniprobe-darwin-amd64
- run: ./E2E/ooniprobe.bash ./ooniprobe-darwin-amd64
shell: bash
publish_darwin_cli:
runs-on: macos-12
needs: test_darwin_cli
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: ooniprobe-darwin-amd64
- uses: actions/download-artifact@v3
with:
name: ooniprobe-darwin-arm64
- uses: actions/download-artifact@v3
with:
name: miniooni-darwin-amd64
- uses: actions/download-artifact@v3
with:
name: miniooni-darwin-arm64
- run: ./script/ghpublish.bash ooniprobe-darwin-amd64 ooniprobe-darwin-arm64 miniooni-darwin-amd64 miniooni-darwin-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# End of autogenerated file