forked from DreamOneX/PhoenixBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macos-workflow
45 lines (45 loc) · 1.66 KB
/
macos-workflow
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
macos-build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Set up ldid
run: brew install ldid
- name: Set up dpkg
run: brew install dpkg
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Pre-Build & configure go-raknet
run: |
make current
make clean
chmod 777 ~/go/pkg/mod/github.com/sandertv/[email protected]/conn.go
sed "s/urrentProtocol byte = 10/urrentProtocol byte = 8/g" ~/go/pkg/mod/github.com/sandertv/[email protected]/conn.go>~/conn.go
cp -f ~/conn.go ~/go/pkg/mod/github.com/sandertv/[email protected]/conn.go
- name: Build
run: make
- name: Package for specific platforms
run: make package
- name: Pack binaries
run: |
mv build/hashes.json build/hashes-1.json
rm build/phoenixbuilder
mv release/*.deb build/
tar -czf fb-macos-binaries.tar.gz build/*
- name: Load Key
env:
FBKEY: ${{ secrets.FBKEY }}
run: |
echo "$FBKEY">~/fbkey
mkdir -p ~/.ssh
printf "StrictHostKeyChecking no\nUserKnownHostsFile /dev/null">~/.ssh/config
chmod 0600 ~/fbkey
- name: Upload binaries
run: |
echo "put fb-macos-binaries.tar.gz">~/a
sftp -i ~/fbkey -b ~/a [email protected]
ssh -i ~/fbkey [email protected] "mkdir -p fbbinaries;mkdir -p fbbinaries/mac;cd fbbinaries/mac;mv ~/fb-macos-binaries.tar.gz ./;tar -xzf fb-macos-binaries.tar.gz;rm fb-macos-binaries.tar.gz;mv build/* ../;cd ../;rm -rf mac"