From ba30b9c79537cbb9874692df87c2406ea43ab58a Mon Sep 17 00:00:00 2001 From: Isaac Date: Mon, 26 Aug 2024 11:23:28 +0100 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bdbf4e0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build/release Electron app + +on: + push: + tags: + - v*.*.* + branches: + - main + +jobs: + release: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, windows-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install Dependencies + run: npm install + + - name: build-mac + if: matrix.os == 'macos-latest' + run: npm run build:mac + + - name: build-win + if: matrix.os == 'windows-latest' + run: npm run build:win + + - name: release + uses: softprops/action-gh-release@v1 + with: + draft: true + files: | + dist/*.exe + dist/*.dmg + env: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}