AppImage update #23
This file contains 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: Publish (Electron + Tauri) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
create_release: | |
name: Create a Release | |
outputs: | |
release_id: ${{ steps.create-release.outputs.result }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Get Release Data | |
id: create-release | |
uses: actions/github-script@v7 | |
with: | |
result-encoding: string | |
script: | | |
const version = await require("./index.js"); | |
console.log(`Version: ${version}`); | |
return version; | |
env: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
publish_tauri: | |
name: Build the Tauri App | |
needs: create_release | |
strategy: | |
matrix: | |
os: [Windows-Latest, Ubuntu-Latest, Macos-Latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Deps | |
run: pnpm install | |
working-directory: tauri | |
- name: install dependencies (ubuntu only) | |
if: matrix.os == 'Ubuntu-Latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Build Tauri App | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
releaseId: ${{ needs.create_release.outputs.release_id }} | |
- name: Release Zip Asset | |
run: node upload.cjs | |
if: matrix.os == 'Windows-Latest' | |
working-directory: tauri | |
env: | |
releaseid: ${{ needs.create_release.outputs.release_id }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
publish_electron: | |
name: Build the Electron App | |
needs: create_release | |
strategy: | |
matrix: | |
os: [Windows-Latest, Ubuntu-Latest, Macos-Latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Deps | |
run: pnpm install | |
working-directory: electron | |
- name: Build | |
run: pnpm build | |
working-directory: electron | |
- name: Get & Release Assets | |
run: node upload.cjs | |
working-directory: electron | |
env: | |
releaseid: ${{ needs.create_release.outputs.release_id }} | |
token: ${{ secrets.GITHUB_TOKEN }} |