File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish @synergycodes/axiom package to NPM 
2+ 
3+ on :
4+   push :
5+     branches :
6+       - main 
7+ 
8+ jobs :
9+   publish :
10+     runs-on : ubuntu-latest 
11+     permissions :
12+       contents : read  
13+       packages : write 
14+     steps :
15+       - name : Checkout repo 
16+         uses : actions/checkout@v4 
17+         with :
18+           fetch-depth : 2 
19+ 
20+       - name : Setup Node.js (with pnpm via Corepack) 
21+         uses : actions/setup-node@v4 
22+         with :
23+           node-version : ' 22' 
24+           cache : ' pnpm' 
25+           cache-dependency-path : ' **/pnpm-lock.yaml' 
26+ 
27+       - name : Install dependencies 
28+         run : pnpm install --frozen-lockfile 
29+ 
30+       - name : Read versions 
31+         id : version-check 
32+         run : | 
33+           OLD=$(git show HEAD~1:packages/ui/package.json | jq -r .version) 
34+           NEW=$(jq -r .version packages/ui/package.json) 
35+           echo "old=$OLD" >> $GITHUB_OUTPUT 
36+           echo "new=$NEW" >> $GITHUB_OUTPUT 
37+ 
38+ name : Build UI package 
39+         if : steps.version-check.outputs.new != steps.version-check.outputs.old 
40+         run : | 
41+           pnpm ui build 
42+ 
43+ name : Publish Beta & Tag Latest 
44+         if : steps.version-check.outputs.new != steps.version-check.outputs.old 
45+         env :
46+           NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }} 
47+         run : | 
48+           cd packages/ui 
49+           echo "Publishing @synergycodes/axiom@${{ steps.version-check.outputs.new }} with 'beta' tag…" 
50+           pnpm publish --access public --tag beta 
51+           echo "Adding 'latest' dist-tag to @synergycodes/axiom@${{ steps.version-check.outputs.new }}…" 
52+           pnpm dist-tag add @synergycodes/axiom@${{ steps.version-check.outputs.new }} latest 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments