From 8398fa390bab99a2745ff767799787776b5bdf1a Mon Sep 17 00:00:00 2001 From: RobertGemmaJr Date: Wed, 6 Dec 2023 13:20:41 -0500 Subject: [PATCH] ci: test full workflow --- .github/workflows/workflow-package.yml | 118 ++++++++++++------------- 1 file changed, 57 insertions(+), 61 deletions(-) diff --git a/.github/workflows/workflow-package.yml b/.github/workflows/workflow-package.yml index e4f9478cb..b31e6de10 100644 --- a/.github/workflows/workflow-package.yml +++ b/.github/workflows/workflow-package.yml @@ -43,73 +43,69 @@ jobs: - name: ⬇️ Checkout repo uses: actions/checkout@v4 - # TEMP - - name: Set package name and version - id: package_info - run: | - echo "name=$(cat package.json | jq -r '.name')" >> $GITHUB_OUTPUT - echo "version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT - - - run: echo "${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}" + - name: ⎔ Setup node + uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: npm + - name: 🐍 Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" - # - name: ⎔ Setup node - # uses: actions/setup-node@v3 - # with: - # node-version-file: .nvmrc - # cache: npm - # - name: 🐍 Setup Python - # uses: actions/setup-python@v4 - # with: - # python-version: "3.10" + # Install dependencies and set up environment + - name: 📥 Install Dependencies + run: npm ci + - name: 🔃 Load .env file (.env.${{github.event.inputs.setting}}) + uses: xom9ikk/dotenv@v2 + with: + path: ./env + mode: ${{github.event.inputs.setting}} - # # Install dependencies and set up environment - # - name: 📥 Install Dependencies - # run: npm ci - # - name: 🔃 Load .env file (.env.${{github.event.inputs.setting}}) - # uses: xom9ikk/dotenv@v2 - # with: - # path: ./env - # mode: ${{github.event.inputs.setting}} + # Build the app + - name: ⚒ Run Build + run: npm run build - # # Build the app - # - name: ⚒ Run Build - # run: npm run build + # Package the app installers + - name: 📦 Package app installer - Windows + if: startsWith(matrix.os, 'windows') + run: npm run package:windows + - name: 📦 Package app installer - Mac + if: startsWith(matrix.os, 'mac') + run: npm run package:mac + - name: 📦 Package app installer - Linux + if: startsWith(matrix.os, 'ubuntu') + run: npm run package:linux - # # Package the app installers - # - name: 📦 Package app installer - Windows - # if: startsWith(matrix.os, 'windows') - # run: npm run package:windows - # - name: 📦 Package app installer - Mac - # if: startsWith(matrix.os, 'mac') - # run: npm run package:mac - # - name: 📦 Package app installer - Linux - # if: startsWith(matrix.os, 'ubuntu') - # run: npm run package:linux - - # # Upload installers to github action + # Upload installers to github action # - name: Set package version and name # uses: brown-ccv/gh-actions/get-package-info@main # id: package_info + - name: Get package name and version + id: package_info + run: | + echo "name=$(cat package.json | jq -r '.name')" >> $GITHUB_OUTPUT + echo "version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT - # - name: ⬆ Upload installer - Windows - # uses: actions/upload-artifact@v3 - # if: startsWith(matrix.os, 'windows') - # with: - # name: ${{ format('win-installer-{0}', github.event.inputs.setting) }} - # path: out/make/squirrel.windows/x64/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }} Setup.exe - # if-no-files-found: error + - name: ⬆ Upload installer - Windows + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'windows') + with: + name: ${{ format('win-installer-{0}', github.event.inputs.setting) }} + path: out/make/squirrel.windows/x64/${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }} Setup.exe + if-no-files-found: error - # - name: ⬆ Upload installer - Mac - # uses: actions/upload-artifact@v3 - # if: startsWith(matrix.os, 'mac') - # with: - # name: ${{ format('mac-installer-{0}', github.event.inputs.setting) }} - # path: out/make/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-x64.dmg - # if-no-files-found: error - # - name: ⬆ Upload installer - Linux - # uses: actions/upload-artifact@v3 - # if: startsWith(matrix.os, 'ubuntu') - # with: - # name: ${{ format('linux-installer-{0}', github.event.inputs.setting) }} - # path: out/make/deb/x64/${{ steps.package_info.outputs.package_name }}_${{ steps.package_info.outputs.package_version }}_amd64.deb - # if-no-files-found: error + - name: ⬆ Upload installer - Mac + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'mac') + with: + name: ${{ format('mac-installer-{0}', github.event.inputs.setting) }} + path: out/make/${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-x64.dmg + if-no-files-found: error + - name: ⬆ Upload installer - Linux + uses: actions/upload-artifact@v3 + if: startsWith(matrix.os, 'ubuntu') + with: + name: ${{ format('linux-installer-{0}', github.event.inputs.setting) }} + path: out/make/deb/x64/${{ steps.package_info.outputs.name }}_${{ steps.package_info.outputs.version }}_amd64.deb + if-no-files-found: error