|
1 | | -# .github/workflows/test-build.yaml |
| 1 | +# .github/workflows/test-build.yml |
2 | 2 |
|
3 | | -on: |
| 3 | +on: |
4 | 4 | push: |
5 | 5 | pull_request: |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - build-linux: |
9 | | - name: Build Linux Client |
10 | | - runs-on: ubuntu-latest |
11 | | - steps: |
12 | | - - uses: actions/checkout@v6 |
13 | | - - name: Set up Go |
14 | | - uses: actions/setup-go@v6 |
15 | | - with: |
16 | | - go-version: '1.25' |
17 | | - - name: Build |
18 | | - run: make build-linux |
19 | | - |
20 | | - - uses: actions/upload-artifact@v6 |
21 | | - if: ${{ env.ACT }} |
22 | | - with: |
23 | | - name: files |
24 | | - path: albiondata-client |
25 | | - |
26 | | - - uses: actions/upload-artifact@v6 |
27 | | - if: ${{ env.ACT }} |
28 | | - with: |
29 | | - name: files |
30 | | - path: update-linux-amd64.gz |
31 | | - |
32 | | - build-windows: |
33 | | - name: Build Windows Client |
34 | | - runs-on: ubuntu-latest |
35 | | - steps: |
36 | | - - uses: actions/checkout@v6 |
37 | | - - name: Set up Go |
38 | | - uses: actions/setup-go@v6 |
39 | | - with: |
40 | | - go-version: '1.25' |
41 | | - |
42 | | - - name: install nsis |
43 | | - run: sudo apt-get update; sudo apt-get -y install nsis |
44 | | - |
45 | | - - name: Make |
46 | | - run: make build-windows |
47 | | - |
48 | | - - uses: actions/upload-artifact@v6 |
49 | | - if: ${{ env.ACT }} |
50 | | - with: |
51 | | - name: files |
52 | | - path: albiondata-client.exe |
53 | | - |
54 | | - - uses: actions/upload-artifact@v6 |
55 | | - if: ${{ env.ACT }} |
56 | | - with: |
57 | | - name: files |
58 | | - path: update-windows-amd64.exe.gz |
59 | | - |
60 | | - - uses: actions/upload-artifact@v6 |
61 | | - if: ${{ env.ACT }} |
62 | | - with: |
63 | | - name: files |
64 | | - path: albiondata-client-amd64-installer.exe |
65 | | - |
66 | | - build-darwin: |
67 | | - name: Build MacOS Client |
68 | | - runs-on: macos-latest |
69 | | - steps: |
70 | | - - uses: actions/checkout@v6 |
71 | | - |
72 | | - - name: Set up Go |
73 | | - uses: actions/setup-go@v6 |
74 | | - with: |
75 | | - go-version: '1.25' |
76 | | - |
77 | | - - name: Build |
78 | | - run: CGO_ENABLED=1 GOARCH=amd64 CC="clang -arch x86_64" CGO_LDFLAGS="-arch x86_64" go build -ldflags "-s -w -X main.version=$GITHUB_REF_NAME" albiondata-client.go |
79 | | - |
80 | | - - name: ls |
81 | | - run: ls -la |
82 | | - |
83 | | - - name: gzip |
84 | | - run: gzip -k9 albiondata-client |
85 | | - |
86 | | - - name: mv |
87 | | - run: mv albiondata-client.gz update-darwin-amd64.gz |
88 | | - |
89 | | - - name: package |
90 | | - run: | |
91 | | - TEMP="albiondata-client" |
92 | | - ZIPNAME="albiondata-client-amd64-mac.zip" |
93 | | - rm -rfv ./scripts/$TEMP |
94 | | - rm -rfv ./$ZIPNAME |
95 | | - rm -rfv ./scripts/update-darwin-amd64.zip |
96 | | - mkdir -v ./scripts/$TEMP |
97 | | - cp -v albiondata-client ./scripts/$TEMP/albiondata-client-executable |
98 | | - cd scripts |
99 | | - cp -v run.command ./$TEMP/run.command |
100 | | - # chown -Rv ${USER}:${USER} ./$TEMP |
101 | | - chmod -v 777 ./$TEMP/* |
102 | | - zip -v ../$ZIPNAME -r ./"$TEMP" |
103 | | -
|
104 | | - - name: ls |
105 | | - run: ls -la |
| 8 | + build: |
| 9 | + uses: ./.github/workflows/build.yml |
0 commit comments