-
-
Notifications
You must be signed in to change notification settings - Fork 138
128 lines (102 loc) · 3.13 KB
/
createPackages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Master Workflow
on:
push:
branches:
- master
jobs:
tests:
strategy:
matrix:
node-version: [16]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm i && npm ci
- name: Run unit tests
uses: coactions/setup-xvfb@v1
with:
run: npm run test-jest
create_release:
needs: tests
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.15'
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: v1.16.0 # Replace with your desired tag or version number
release_name: Release v1.16.0 # Replace with your desired release name
draft: true
body: |
Fully implemented CI/CD pipeline for windows, mac, and linux.
windows:
needs: create_release
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.15'
- name: Install Dependencies
run: npm install
- name: Build and Package for Windows
run: npm run package-win
linux:
needs: create_release
runs-on: ubuntu-latest # Using a Linux runner
env: # Adding the environment variable for the GH_TOKEN
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.15' # Use the specific version of Node that your project requires
- name: Install Dependencies
run: npm install
- name: Build and Package for Linux
run: npm run package-linux
# Optional step to upload the Linux package as an artifact
- name: Upload Linux Package
uses: actions/upload-artifact@v2
with:
name: linux-app
path: release/Swell-1.15.0.AppImage # Change the path according to your Linux build output
mac:
needs: create_release
runs-on: macOS-latest
env: # Adding the environment variable for the GH_TOKEN
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.15' # Use the specific version of Node that your project requires
- name: Install Dependencies
run: npm install
- name: Build and Package for Mac
run: npm run package-mac