/[sudobot]/branches/6.x/.github/workflows/release.yml
ViewVC logotype

Annotation of /branches/6.x/.github/workflows/release.yml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 577 - (hide annotations)
Mon Jul 29 18:52:37 2024 UTC (8 months ago) by rakinar2
File size: 4981 byte(s)
chore: add old version archive branches (2.x to 9.x-dev)
1 rakinar2 577 name: Releases
2     on:
3     push:
4     branches:
5     - main
6    
7     jobs:
8     build_linux:
9     if: github.repository_owner == 'onesoft-sudo'
10     runs-on: ubuntu-latest
11    
12     steps:
13     - uses: actions/checkout@v3
14    
15     - name: Use Node.js 21.x
16     uses: actions/setup-node@v3
17     with:
18     node-version: 21.x
19    
20     - name: "Install Programs, Libraies and Tools"
21     run: |
22     sudo apt update;
23     sudo apt install build-essential libcurl4 libcurl4-gnutls-dev -y;
24    
25     - name: "Install Native Libraries"
26     run: |
27     git clone https://github.com/Cogmasters/concord;
28     cd concord;
29     make;
30     sudo make install;
31     cd ..;
32    
33     - name: "Build (Native)"
34     run: make
35    
36     - name: "Install Dependencies"
37     run: npm install
38    
39     - name: "Install Dev Dependencies"
40     run: npm install -D
41    
42     - name: "Generate prisma client"
43     run: npx prisma generate
44    
45     - name: "ESLint"
46     run: npm run lint || echo "ESLint Failed"
47    
48     - name: "Build"
49     run: npm run build --if-present
50    
51     - name: "Package the built files"
52     run: |
53     mkdir sudobot;
54     mkdir sudobot/lib;
55     mv build sudobot;
56     mv lib/build sudobot/lib;
57     tar -cvzf sudobot-release-linux.tar.gz sudobot
58    
59     - name: Upload Release Artifacts
60     uses: actions/upload-artifact@v3
61     with:
62     name: sudobot-release-linux
63     path: |
64     ./sudobot-release-linux.tar.gz
65    
66     build_macos:
67     if: github.repository_owner == 'onesoft-sudo'
68     runs-on: macos-latest
69    
70     steps:
71     - uses: actions/checkout@v3
72    
73     - name: Use Node.js 21.x
74     uses: actions/setup-node@v3
75     with:
76     node-version: 21.x
77    
78     - name: "Install Programs, Libraies and Tools"
79     run: brew install curl
80    
81     - name: "Install Native Libraries"
82     run: |
83     git clone https://github.com/Cogmasters/concord;
84     cd concord;
85     make;
86     sudo make install;
87     cd ..;
88    
89     - name: "Build (Native)"
90     run: make
91    
92     - name: "Install Dependencies"
93     run: npm install
94    
95     - name: "Install Dev Dependencies"
96     run: npm install -D
97    
98     - name: "Generate prisma client"
99     run: npx prisma generate
100    
101     - name: "ESLint"
102     run: npm run lint || echo "ESLint Failed"
103    
104     - name: "Build"
105     run: npm run build --if-present
106    
107     - name: "Package the built files"
108     run: |
109     mkdir sudobot;
110     mkdir sudobot/lib;
111     mv build sudobot;
112     mv lib/build sudobot/lib;
113     tar -cvzf sudobot-release-darwin.tar.gz sudobot
114    
115     - name: Upload Release Artifacts
116     uses: actions/upload-artifact@v3
117     with:
118     name: sudobot-release-darwin
119     path: |
120     ./sudobot-release-darwin.tar.gz
121    
122     release:
123     needs: [build_linux, build_macos]
124     if: github.repository_owner == 'onesoft-sudo'
125     runs-on: ubuntu-latest
126    
127     steps:
128     - uses: actions/checkout@v3
129    
130     - name: Conventional Changelog Action
131     id: changelog
132     uses: TriPSs/[email protected]
133     with:
134     github-token: ${{ secrets.__TOKEN }}
135     version-file: "./package.json"
136     git-user-name: "Conventional Release Action"
137     git-user-email: [email protected]
138    
139     - name: Download Linux Release Artifact
140     uses: actions/download-artifact@v2
141     with:
142     name: sudobot-release-linux
143    
144     - name: Download macOS Release Artifact
145     uses: actions/download-artifact@v2
146     with:
147     name: sudobot-release-darwin
148    
149     - name: Create Release
150     id: create_release
151     uses: ncipollo/release-action@v1
152     if: ${{ steps.changelog.outputs.skipped == 'false' }}
153     env:
154     GITHUB_TOKEN: ${{ secrets.__TOKEN }}
155     with:
156     tag: ${{ steps.changelog.outputs.tag }}
157     name: ${{ steps.changelog.outputs.tag }}
158     body: ${{ steps.changelog.outputs.clean_changelog }}
159     artifactContentType: application/x-gzip
160     artifacts: ./sudobot-release-linux.tar.gz,./sudobot-release-darwin.tar.gz

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26