One-click backups for AT Protocol
at main 3.3 kB view raw
1name: "publish" 2 3on: 4 workflow_dispatch: 5 push: 6 branches: 7 - release 8 9jobs: 10 publish-tauri: 11 permissions: 12 contents: write 13 strategy: 14 fail-fast: false 15 matrix: 16 include: 17 - platform: "macos-latest" # for Arm based macs (M1 and above). 18 args: "--target aarch64-apple-darwin" 19 - platform: "macos-latest" # for Intel based macs. 20 args: "--target x86_64-apple-darwin" 21 - platform: "ubuntu-22.04" 22 args: "" 23 - platform: "windows-latest" 24 args: "" 25 26 runs-on: ${{ matrix.platform }} 27 steps: 28 - uses: actions/checkout@v4 29 30 - name: Get version from tag 31 id: tag_name 32 shell: bash 33 run: | 34 version=$(jq -r '.version' src-tauri/tauri.conf.json) 35 echo "current_version=$version" >> $GITHUB_OUTPUT 36 37 - name: Get Changelog Entry 38 id: changelog_reader 39 uses: mindsers/changelog-reader-action@v2 40 with: 41 validation_level: warn 42 version: ${{ steps.tag_name.outputs.current_version }} 43 path: ./CHANGELOG.md 44 45 - name: install dependencies (ubuntu only) 46 if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. 47 run: | 48 sudo apt-get update 49 sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf 50 51 - name: setup node 52 uses: actions/setup-node@v4 53 with: 54 node-version: lts/* 55 cache: "npm" # Set this to npm, yarn or pnpm. 56 - uses: oven-sh/setup-bun@v2 57 58 - name: install Rust stable 59 uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly 60 with: 61 # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. 62 targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} 63 64 - name: Rust cache 65 uses: swatinem/rust-cache@v2 66 with: 67 workspaces: "./src-tauri -> target" 68 69 - name: Cache dependencies 70 uses: actions/cache@v4 71 with: 72 path: | 73 ~/.bun/install/cache 74 node_modules 75 .eslintcache 76 key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} 77 restore-keys: | 78 ${{ runner.os }}-bun- 79 80 - name: install frontend dependencies 81 # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. 82 run: bun install # change this to npm or pnpm depending on which one you use. 83 84 - uses: tauri-apps/tauri-action@v0 85 env: 86 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 87 TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} 88 TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} 89 with: 90 tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. 91 releaseName: "App v__VERSION__" 92 releaseBody: ${{ steps.changelog_reader.outputs.changes }} 93 releaseDraft: true 94 prerelease: false 95 args: ${{ matrix.args }} 96 assetNamePattern: "[name]_[version]_[platform]_[arch][ext]"