/[sudobot]/branches/9.x-dev/.github/workflows/release.yml
ViewVC logotype

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26