|
| 1 | +name: "publish" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + |
| 8 | +jobs: |
| 9 | + v1: |
| 10 | + permissions: |
| 11 | + contents: write |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + include: |
| 16 | + - platform: "macos-latest" |
| 17 | + args: "--verbose --target universal-apple-darwin" |
| 18 | + - platform: "ubuntu-20.04" |
| 19 | + args: "--verbose" |
| 20 | + - platform: "windows-latest" |
| 21 | + args: "--verbose" |
| 22 | + |
| 23 | + runs-on: ${{ matrix.platform }} |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v4 |
| 26 | + |
| 27 | + # node |
| 28 | + - name: install pnpm |
| 29 | + uses: pnpm/action-setup@v4 |
| 30 | + with: |
| 31 | + version: 9.x.x |
| 32 | + |
| 33 | + - name: setup node |
| 34 | + uses: actions/setup-node@v4 |
| 35 | + with: |
| 36 | + node-version: lts/* |
| 37 | + cache: pnpm |
| 38 | + |
| 39 | + # rust |
| 40 | + - name: install Rust stable |
| 41 | + uses: dtolnay/rust-toolchain@stable |
| 42 | + with: |
| 43 | + # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. |
| 44 | + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} |
| 45 | + |
| 46 | + - name: install dependencies (ubuntu only) |
| 47 | + if: matrix.platform == 'ubuntu-20.04' # This must match the platform value defined above. |
| 48 | + run: | |
| 49 | + sudo apt-get update |
| 50 | + sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf |
| 51 | + # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. |
| 52 | + # You can remove the one that doesn't apply to your app to speed up the workflow a bit. |
| 53 | + |
| 54 | + - name: install frontend dependencies |
| 55 | + run: pnpm install # change this to npm, pnpm or bun depending on which one you use. |
| 56 | + |
| 57 | + - name: Rust cache |
| 58 | + uses: Swatinem/rust-cache@v2 |
| 59 | + with: |
| 60 | + workspaces: ./src-tauri |
| 61 | + |
| 62 | + - uses: tauri-apps/tauri-action@v0 |
| 63 | + env: |
| 64 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + with: |
| 66 | + tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. |
| 67 | + releaseName: "App v__VERSION__" |
| 68 | + releaseBody: "See the assets to download this version and install." |
| 69 | + releaseDraft: true |
| 70 | + prerelease: false |
| 71 | + args: ${{ matrix.args }} |
0 commit comments