diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml deleted file mode 100644 index 6c441114..00000000 --- a/.github/workflows/build-and-release.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Build and Deploy Electron App - -on: push - - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: '18' - - - name: Install dependencies - run: npm install - - - name: Build Electron app - run: npm run dist - - - name: Archive built files - uses: actions/upload-artifact@v2 - with: - name: electron-build - path: dist/ - - deploy: - runs-on: ubuntu-latest - needs: build - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Download built files - uses: actions/download-artifact@v2 - with: - name: electron-build - - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: '18' - - - name: Install dependencies - run: npm install - - - name: Deploy release to GitHub - uses: softprops/action-gh-release@v1 - with: - files: | - dist/* - tag_name: v${{ github.ref }} - title: Release ${{ github.ref }} - body: Release of ${{ github.sha }} - - - name: Publish to GitHub Packages - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - repository: ${{ github.repository }} - env: - NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Install Dependencies - run: | - cd src - npm install - - - name: Build - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: npm run dist - shell: bash - - - name: Build and Publish the Electron App to GitHub Packages - uses: samuelmeuli/action-electron-builder@v2 - with: - publish: always - draft: true - prerelease: false - token: ${{ secrets.GH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e77973ef..13704512 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,3 +36,28 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: npm run dist shell: bash + + - name: Deploy release to GitHub + uses: softprops/action-gh-release@v1 + with: + files: | + dist/* + tag_name: v${{ github.ref }} + title: Release ${{ github.ref }} + body: Release of ${{ github.sha }} + + - name: Publish to GitHub Packages + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + repository: ${{ github.repository }} + env: + NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }} + + - name: Build and Publish the Electron App to GitHub Packages + uses: samuelmeuli/action-electron-builder@v2 + with: + publish: always + draft: true + prerelease: false + token: ${{ secrets.GH_TOKEN }} \ No newline at end of file