name: 'publish' on: push: branches: - main jobs: publish-tauri: permissions: contents: write strategy: fail-fast: false matrix: platform: [ubuntu-20.04,macos-latest,windows-latest] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 - name: setup node uses: actions/setup-node@v3 with: node-version: 18 - id: set_var run: | echo 'VERSION_JSON<> $GITHUB_ENV cat ./version.json >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV - 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: "${{fromJson(env.VERSION_JSON).version}}" name: "${{fromJson(env.VERSION_JSON).version}}" generate_release_notes: true 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: "${{fromJson(env.VERSION_JSON).version}}" name: "${{fromJson(env.VERSION_JSON).version}}" generate_release_notes: true 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: "${{fromJson(env.VERSION_JSON).version}}" name: "${{fromJson(env.VERSION_JSON).version}}" generate_release_notes: true files: | src-tauri/target/x86_64-pc-windows-msvc/release/**/*.msi