Skip to content

Commit 0c1afc9

Browse files
committed
Update build.yml
1 parent 6fa8a48 commit 0c1afc9

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

.github/workflows/build.yml

+13-17
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Checkout TheCyberHUB-Desktop code
16+
- name: Checkout code
1717
uses: actions/checkout@v2
1818

19-
- name: Checkout TheCyberHUB gh-pages code
20-
uses: actions/checkout@v2
21-
with:
22-
repository: th3cyb3rhub/TheCyberHUB # Replace with your GitHub username and repo name
23-
ref: gh-pages # Check out the gh-pages branch
24-
path: gh-pages # Place the contents in a 'gh-pages' directory
25-
2619
- name: Set up Node.js
2720
uses: actions/setup-node@v2
2821
with:
@@ -31,22 +24,25 @@ jobs:
3124
- name: Clear Electron Builder Cache
3225
run: rm -rf $HOME/.cache/electron-builder
3326

34-
- name: Copy thecyberhub build files
35-
run: |
36-
mkdir -p dist # Create the dist directory if it doesn't exist
37-
cp -R gh-pages/* ./ # Copy files from the 'gh-pages' directory to the current working directory
38-
3927
- name: Install dependencies
4028
run: npm install
4129

42-
- name: Package the app
43-
run: npm run package
30+
- name: Package the app for Linux, Windows, and macOS
31+
run: |
32+
# Build for Linux, Windows, and macOS without publishing
33+
npx electron-builder --linux AppImage --win nsis --mac dmg -p never
34+
env:
35+
GH_TOKEN: ${{ secrets.GH_TOKEN }} # Use your GitHub token with write permissions
4436

4537
- name: Upload Release Assets
4638
uses: ncipollo/release-action@v1
4739
with:
4840
tag: 'v${{ github.run_number }}'
41+
name: 'TheCyberHUB Desktop Release v${{ github.run_number }}'
4942
files: |
50-
dist/mac/*.dmg # Adjust this to your actual build output
43+
dist/*.AppImage
44+
dist/*.exe
45+
dist/*.dmg
5146
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # test
47+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)