From cf1d045f91eec0a5e3314cfdf85966ea8c7da8fe Mon Sep 17 00:00:00 2001 From: abryab <128729022+abryab@users.noreply.github.com> Date: Fri, 13 Sep 2024 18:37:18 +0330 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 99 ++++++++--------------------------- 1 file changed, 22 insertions(+), 77 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b39b958..4d81ae6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,92 +1,37 @@ -name: Release +name: BuildCode 🚀 + on: push: - branches: ["main"] paths-ignore: - - "README.md" - - "README-*.md" - - ".github/ISSUE_TEMPLATE/*" + - '*.yml' + - '.github/*' + jobs: - publish_on_linux: + build: runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: 📥 Checkout repository uses: actions/checkout@v3 - - name: Install Node v20 + - name: 🔧 Set up Node.js uses: actions/setup-node@v3 with: - node-version: 20 - cache: npm - - - name: Install dependencies - run: npm install - - - name: Install electron-builder - run: npm i electron-builder -g - - - name: Publish - env: - GH_TOKEN: ${{ secrets.TOKEN }} - run: npm run publish:linux - publish_on_win: - runs-on: windows-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 + node-version: 18 + cache: 'npm' - - name: Install Node v20 - uses: actions/setup-node@v3 + - name: 📦 Cache node_modules + uses: actions/cache@v3 with: - node-version: 20 - cache: npm - - - name: Install dependencies - run: npm install - - - name: Install electron-builder - run: npm i electron-builder -g - - - name: Publish - env: - GH_TOKEN: ${{ secrets.TOKEN }} - run: npm run publish:win - publish_on_macos: - runs-on: macOS-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install Node v20 - uses: actions/setup-node@v3 - with: - node-version: 20 - cache: npm - - - name: Install Python - run: brew install python@3.11 - - - name: "Install Python setuptools" - run: brew install python-setuptools - - - name: Install Build Tools - run: | - brew install libtool automake autoconf - sudo xcode-select --reset - - - name: Update node-gyp - run: npm install -g node-gyp - - - name: Install dependencies - run: npm install + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - - name: Install dmglicense - run: npm install dmg-license -f + - name: 📚 Install dependencies + run: npm ci - - name: Install electron-builder - run: npm i electron-builder -g + - name: ⚙️ Install electron-builder globally + run: npm install -g electron-builder - - name: Publish - env: - GH_TOKEN: ${{ secrets.TOKEN }} - run: npm run publish:mac \ No newline at end of file + - name: 🏗️ Build the project + run: npm run build:ts