@@ -9,11 +9,8 @@ permissions:
99 contents : write
1010
1111jobs :
12- build :
13- runs-on : ${{ matrix.os }}
14- strategy :
15- matrix :
16- os : [ubuntu-latest, macos-latest, windows-latest]
12+ build-and-release :
13+ runs-on : ubuntu-latest
1714 steps :
1815 - name : Checkout code
1916 uses : actions/checkout@v3
@@ -25,54 +22,10 @@ jobs:
2522 go-version : " 1.20"
2623 cache : true
2724 - name : Install dependencies
28- if : matrix.os == 'ubuntu-latest'
2925 run : sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
3026 - name : Build and release binaries
31- if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
32- run : |
33- if [ "$RUNNER_OS" == "Linux" ]; then
34- make build-release-linux
35- elif [ "$RUNNER_OS" == "macOS" ]; then
36- make build-release-darwin
37- fi
38- - name : Build and release binaries
39- if : matrix.os == 'windows-latest'
4027 run : |
41- make build-release-windows
42- - name : Upload binaries and checksums
43- if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
44- uses : actions/upload-artifact@v3
45- with :
46- path : dist/*.tar.gz
47- name : dist-${{ matrix.os }}
48- if-no-files-found : warn
49- - name : Upload binaries and checksums
50- if : matrix.os == 'windows-latest'
51- uses : actions/upload-artifact@v3
52- with :
53- path : dist/*.zip
54- name : dist-${{ matrix.os }}
55- if-no-files-found : warn
56- release :
57- needs : build
58- runs-on : ubuntu-latest
59- steps :
60- - name : Checkout code
61- uses : actions/checkout@v3
62- with :
63- fetch-depth : 0
64- - name : Download binaries and checksums for Windows
65- uses : actions/download-artifact@v3
66- with :
67- name : dist-windows-latest
68- - name : Download binaries and checksums for Linux
69- uses : actions/download-artifact@v3
70- with :
71- name : dist-ubuntu-latest
72- - name : Download binaries and checksums for macOS
73- uses : actions/download-artifact@v3
74- with :
75- name : dist-macos-latest
28+ make build-release
7629 - name : Generate release checksums
7730 run : make generate-release-checksums
7831 - name : Create release and add artifacts
0 commit comments