|
| 1 | +name: Release |
| 2 | +on: |
| 3 | + push: |
| 4 | + tags: |
| 5 | + - "v*" |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + release: |
| 10 | + permissions: |
| 11 | + contents: write |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + platform: [macos-latest, ubuntu-22.04, windows-latest] |
| 16 | + runs-on: ${{ matrix.platform }} |
| 17 | + |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - name: setup node |
| 22 | + uses: actions/setup-node@v4 |
| 23 | + with: |
| 24 | + node-version: lts/* |
| 25 | + |
| 26 | + - name: install Rust |
| 27 | + uses: dtolnay/rust-toolchain@stable |
| 28 | + with: |
| 29 | + toolchain: nightly-2024-05-04 # 1.80.0-nightly (e82c861d7 2024-05-04) |
| 30 | + targets: wasm32-unknown-unknown,${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} |
| 31 | + |
| 32 | + - name: install Tauri cli |
| 33 | + run: cargo install tauri-cli |
| 34 | + |
| 35 | + - name: install Tailwind CSS |
| 36 | + run: npm i -g tailwindcss |
| 37 | + |
| 38 | + - name: generate Tailwind CSS |
| 39 | + run: npx tailwindcss -i ./input.css -o ./style/output.css |
| 40 | + |
| 41 | + - uses: jetli/trunk-action@v0.1.0 |
| 42 | + with: |
| 43 | + # Optional version of trunk to install(eg. 'v0.8.1', 'latest') |
| 44 | + version: "latest" |
| 45 | + |
| 46 | + - name: install dependencies (ubuntu only) |
| 47 | + if: matrix.platform == 'ubuntu-22.04' |
| 48 | + run: | |
| 49 | + sudo apt-get update |
| 50 | + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev |
| 51 | + - name: Rust cache |
| 52 | + uses: swatinem/rust-cache@v2 |
| 53 | + with: |
| 54 | + workspaces: "./src-tauri -> target" |
| 55 | + |
| 56 | + - name: build in release mode |
| 57 | + run: cargo tauri build |
| 58 | + |
| 59 | + - uses: tauri-apps/tauri-action@v0 |
| 60 | + env: |
| 61 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 62 | + with: |
| 63 | + tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags. |
| 64 | + releaseName: "RSQL v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version. |
| 65 | + releaseBody: "See the assets to download and install this version." |
| 66 | + releaseDraft: true |
| 67 | + prerelease: false |
0 commit comments