Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-treason committed Mar 13, 2024
1 parent 371fc55 commit 7f4ac74
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 36 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,19 @@ jobs:
- uses: actions/checkout@v3

- name: Fetch dependencies
run: npm i

- name: Build packages
run: |
npm run build:graphql-docs
npm run build:bruno-query
npm run build:bruno-common
- name: Build electron
run: pnpm i
- name: Make
run: |
npm run build:electron -- win
pnpm run make
ls ./packages/bruno-electron/out/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: build-windows
path: |
./packages/bruno-electron/out/bruno-lazer_nightly_x64_win.msi
./packages/bruno-electron/out/bruno-*
retention-days: 1
if-no-files-found: error

linux:
runs-on: ubuntu-latest
Expand All @@ -87,27 +81,19 @@ jobs:
- uses: actions/checkout@v3

- name: Fetch dependencies
run: npm i

- name: Build packages
run: |
npm run build:graphql-docs
npm run build:bruno-query
npm run build:bruno-common
- name: Build AppImage
run: pnpm i
- name: Make
run: |
npm run build:electron -- linux
npm run build:electron -- deb
pnpm run make
ls ./packages/bruno-electron/out/
- uses: actions/upload-artifact@v3
with:
name: build-linux
path: |
./packages/bruno-electron/out/bruno-lazer_nightly_amd64_linux.deb
./packages/bruno-electron/out/bruno-lazer_nightly_x86_64_linux.AppImage
./packages/bruno-electron/out/bruno-*
retention-days: 1
if-no-files-found: error

publish:
if: github.event_name != 'pull_request'
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"prettier:web": "pnpm run --filter @usebruno/app prettier",
"electron": "pnpm run --filter bruno-lazer electron",
"build": "pnpm run --parallel --recursive --if-present build",
"build:web": "pnpm run --filter=@usebruno/app build",
"build:electron": "node ./scripts/build-electron.js",
"make": "node ./scripts/make.js",
"test:e2e": "npx playwright test",
"test:report": "npx playwright show-report",
"test:prettier:web": "npm run test:prettier --workspace=packages/bruno-app",
Expand Down
12 changes: 3 additions & 9 deletions scripts/build-electron.js → scripts/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async function main(args) {
log('Clean up old build artifacts');
await execCommandWithOutput('pnpm', ['run', 'clean']);

log('Building web');
log('Building packages');
await execCommandWithOutput('npm', ['run', 'build']);
// Copy the output of bruno-app into electron
await fs.ensureDir('packages/bruno-electron/web');
Expand All @@ -120,15 +120,9 @@ async function main(args) {

// Run npm dist command
log(`Building the Electron app for: ${os}/${arch}`);
await execCommandWithOutput('npm', [
'run',
'--workspace=packages/bruno-electron',
'dist',
'--',
`--${arch}`,
`--${os}`
]);
await execCommandWithOutput('pnpm', ['run', '--filter', 'bruno-lazer', 'dist', '--', `--${arch}`, `--${os}`]);
log('Build complete');

return 0;
}

Expand Down

0 comments on commit 7f4ac74

Please sign in to comment.