File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Release Ziina 
2+ 
3+ on :
4+   push :
5+     branches : [main] 
6+     tags :
7+       - ' v*' 
8+   pull_request :
9+   workflow_dispatch :
10+ 
11+ permissions :
12+   contents : write   #  Needed to create releases
13+ 
14+ jobs :
15+   build :
16+     name : Build for ${{ matrix.goos }} ${{ matrix.goarch }} 
17+     runs-on : ubuntu-latest 
18+ 
19+     strategy :
20+       matrix :
21+         goos : [linux, darwin] 
22+         goarch : [amd64, arm64] 
23+ 
24+     steps :
25+       - name : Checkout code 
26+         uses : actions/checkout@v4 
27+ 
28+       - name : Set up Go 
29+         uses : actions/setup-go@v5 
30+         with :
31+           go-version : ' 1.24.2' 
32+ 
33+       - name : Build binary 
34+         env :
35+           GOOS : ${{ matrix.goos }} 
36+           GOARCH : ${{ matrix.goarch }} 
37+         run : | 
38+           mkdir -p dist 
39+           BIN_NAME="ziina-${GOOS}-${GOARCH}" 
40+           GOOS=${GOOS} GOARCH=${GOARCH} go build -o dist/$BIN_NAME . 
41+           echo "BIN_NAME=$BIN_NAME" >> $GITHUB_ENV 
42+ 
43+        - name : Upload artifact 
44+         uses : actions/upload-artifact@v4 
45+         with :
46+           name : ${{ env.BIN_NAME }} 
47+           path : dist/${{ env.BIN_NAME }} 
48+ 
49+   release :
50+     name : Create GitHub Release 
51+     needs : build 
52+     if : startsWith(github.ref, 'refs/tags/') 
53+     runs-on : ubuntu-latest 
54+ 
55+     steps :
56+       - name : Download artifacts 
57+         uses : actions/download-artifact@v4 
58+         with :
59+           path : artifacts 
60+ 
61+       - name : Create Release 
62+         uses : softprops/action-gh-release@v2 
63+         with :
64+           name : Ziina ${{ github.ref_name }} 
65+           tag_name : ${{ github.ref_name }} 
66+           files : artifacts/**/* 
67+         env :
68+           GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
69+ 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You canβt perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments