v0.8.0. #32
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build-app | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: | |
| contents: write | |
| env: | |
| ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| node-version: [24] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install Dependencies | |
| run: | | |
| sudo dpkg --add-architecture i386 | |
| sudo apt update | |
| sudo apt install -y fakeroot mono-complete p7zip-full rpm wine-stable | |
| mkdir -p "${HOME}/.wine/drive_c/windows/system32" | |
| ln -sf $(which 7z) "${HOME}/.wine/drive_c/windows/system32/7z.exe" | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| id: pnpm-install | |
| with: | |
| run_install: false | |
| - name: Cache Electron Downloads | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./.cache/electron | |
| key: ${{ runner.os }}-electron-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-electron- | |
| - name: Install Node Dependencies | |
| run: pnpm install | |
| - name: Build Renderer | |
| run: pnpm exec vp build | |
| - name: Build Native Apps | |
| run: | | |
| rm -rf ./out | |
| pnpm exec electron-forge make --platform=linux --arch=x64 | |
| test -d ./out | |
| pnpm exec electron-forge make --platform=win32 --arch=x64 | |
| test -d ./out | |
| - name: Attach Native Apps to Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| shopt -s nullglob | |
| assets=( | |
| "${GITHUB_WORKSPACE}"/out/make/deb/x64/*.deb | |
| "${GITHUB_WORKSPACE}"/out/make/rpm/x64/*.rpm | |
| "${GITHUB_WORKSPACE}"/out/make/zip/win32/x64/*.zip | |
| ) | |
| if [ "${#assets[@]}" -eq 0 ]; then | |
| echo "No release assets found." | |
| find "${GITHUB_WORKSPACE}/out" -type f | |
| exit 1 | |
| fi | |
| gh release view "${TAG_NAME}" >/dev/null 2>&1 \ | |
| || gh release create "${TAG_NAME}" --generate-notes --title "${TAG_NAME}" --verify-tag | |
| gh release upload "${TAG_NAME}" "${assets[@]}" --clobber |