Skip to content

Commit

Permalink
Fixed release CI (#2059)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Aug 5, 2023
1 parent eea130c commit edccf4f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 12 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
pull_request:
branches: ['*']
types:
- opened
- synchronize
- closed
paths:
- '.github/**'
- 'package.json'
- 'package-lock.json'
- 'forge.config.js'
- 'webpack*.js'
push:
branches: [main]

permissions: read-all

jobs:
release-test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- name: publish --dry-run
shell: bash
run: npm run publish -- --dry-run
7 changes: 1 addition & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
if [[ ${{ matrix.os }} == 'macos-latest' ]]; then
npm run publish-mac
else
npm run publish
fi
run: npm run publish
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@
"debug:py": "cd backend/src && nodemon --exec \"python -m debugpy --listen 5678\" ./run.py 8000",
"package": "cross-env NODE_ENV=production electron-forge package",
"make": "cross-env NODE_ENV=production electron-forge make",
"make-mac-arm64": "cross-env NODE_ENV=production electron-forge make --arch=arm64",
"make-mac-x64": "cross-env NODE_ENV=production electron-forge make --arch=x64",
"make-linux-zip": "cross-env NODE_ENV=production electron-forge make --targets @electron-forge/maker-zip --platform linux",
"make-win-zip": "cross-env NODE_ENV=production electron-forge make --targets @electron-forge/maker-zip --platform win32",
"make-mac-arm64-zip": "cross-env NODE_ENV=production electron-forge make --targets @electron-forge/maker-zip --arch arm64",
"make-mac-x64-zip": "cross-env NODE_ENV=production electron-forge make --targets @electron-forge/maker-zip --arch x64",
"make-mac-all": "npm run make-mac-arm64 && npm run make-mac-x64",
"publish-mac": "npm run make-mac-all && npm run publish",
"make-mac-zip": "cross-env NODE_ENV=production electron-forge make --targets @electron-forge/maker-zip --platform darwin",
"publish": "cross-env NODE_ENV=production electron-forge publish",
"lint": "npm run lint:js && npm run lint:py",
"lint:js": "eslint . --ext \".js,.jsx,.ts,.tsx\" && stylelint src/**/*.scss",
Expand Down

0 comments on commit edccf4f

Please sign in to comment.