72 lines
2.6 KiB
YAML
72 lines
2.6 KiB
YAML
name: 'publish'
|
|
on:
|
|
push:
|
|
branches:
|
|
- release
|
|
|
|
jobs:
|
|
publish-tauri:
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [ubuntu-20.04]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- name: install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
- name: install Rust stable
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
- name: install dependencies (ubuntu only)
|
|
if: matrix.platform == 'ubuntu-20.04'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
|
- name: install frontend dependencies
|
|
run: pnpm install --no-frozen-lockfile # change this to npm or pnpm depending on which one you use
|
|
- if: matrix.platform == 'ubuntu-20.04'
|
|
run: pnpm tauri build --target x86_64-unknown-linux-gnu
|
|
- if: matrix.platform == 'ubuntu-20.04'
|
|
uses: "softprops/action-gh-release@v1"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: "latest"
|
|
tag_name: "${{ github.event.head_commit.message }}"
|
|
name: "${{ github.event.head_commit.message }}"
|
|
files: |
|
|
src-tauri/target/x86_64-unknown-linux-gnu/release/**/*.deb
|
|
src-tauri/target/x86_64-unknown-linux-gnu/release/**/*.AppImage
|
|
- if: matrix.platform == 'macos-latest'
|
|
run: pnpm tauri build --target x86_64-apple-darwin
|
|
- if: matrix.platform == 'macos-latest'
|
|
uses: "softprops/action-gh-release@v1"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: "latest"
|
|
tag_name: "${{ github.event.head_commit.message }}"
|
|
name: "${{ github.event.head_commit.message }}"
|
|
files: |
|
|
src-tauri/target/x86_64-apple-darwin/release/bundle/macos/*.app
|
|
src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
|
|
- if: matrix.platform == 'windows-latest'
|
|
run: pnpm tauri build
|
|
- if: matrix.platform == 'windows-latest'
|
|
uses: "softprops/action-gh-release@v1"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: "latest"
|
|
tag_name: "${{ github.event.head_commit.message }}"
|
|
name: "${{ github.event.head_commit.message }}"
|
|
files: |
|
|
src-tauri/target/x86_64-pc-windows-msvc/release/**/*.msi |