From b1042f55ea897a64ec95e8cb9d879a24696cd2f9 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Sat, 1 Oct 2022 22:12:45 -0400 Subject: [PATCH] Create github actions to build tauri apps --- .github/workflows/beta.yml | 43 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++ .github/workflows/test.yml | 34 +++++++++++++++++++++++++++ README.md | 10 ++++---- 4 files changed, 120 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/beta.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml new file mode 100644 index 0000000..96f6982 --- /dev/null +++ b/.github/workflows/beta.yml @@ -0,0 +1,43 @@ +name: "beta" +on: + workflow_dispatch: + push: + branches: + - master + tags-ignore: + - 'v*' + +jobs: + publish-tauri: + strategy: + fail-fast: false + matrix: + platform: [macos-latest, ubuntu-20.04, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: 16 + - 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 webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf + - name: Dynamically set MY_DATE environment variable + run: echo "BETA_TAG=beta-$(git show -s --format=%cd-%h --date=format:'%Y-%m-%d' HEAD)" >> $GITHUB_ENV + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: ${{ env.BETA_TAG }} + releaseName: ${{ env.BETA_TAG }} + releaseBody: "See the assets to download this version and install." + releaseDraft: false + prerelease: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9d51fcd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: "release" +on: + push: + tags: + - 'v*' + +jobs: + publish-tauri: + strategy: + fail-fast: false + matrix: + platform: [macos-latest, ubuntu-20.04, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: 16 + - 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 webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: v__VERSION__ + releaseName: "v__VERSION__" + releaseBody: "See the assets to download this version and install." + releaseDraft: false + prerelease: false diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..05ae5bc --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: "test" +on: + workflow_dispatch: + pull_request: + push: + branches-ignore: + - master + +jobs: + test-tauri: + strategy: + fail-fast: false + matrix: + platform: [macos-latest, ubuntu-20.04, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: 16 + - 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 webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index a0a8948..ca1c577 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ server through [xmpp-proxy](https://github.com/moparisthebest/xmpp-proxy). It's the first known client to support [QUIC](https://xmpp.org/extensions/xep-0467.html). -To build install Tauri `cargo install create-tauri-app`, then run `cargo tauri build` +To build install Tauri `cargo install create-tauri-app`, then run `cargo tauri build`. -If you trust me you can download these binaries, I've only tested the AppImage ([arch btw](https://www.moparisthebest.com/images/i-only-use-arch-linux.png)): - * [converse-tauri_0.1.0_amd64.AppImage](https://www.moparisthebest.com/converse-tauri_0.1.0_amd64.AppImage) - * [converse-tauri_0.1.0_amd64.deb](https://www.moparisthebest.com/converse-tauri_0.1.0_amd64.deb) +If you want to download binaries head over to [Releases](https://github.com/conversejs/converse-tauri/releases). #### License -GNU/AGPLv3 - Check LICENSE.md for details +MPLv2 - Converse.js files under dist/ excluding 3rdparty/ +GNU/GPLv3 - dist/3rdparty/libsignal-protocol.min.js +GNU/AGPLv3 - Rust files under src-tauri/ - Check LICENSE.md for details