Release v3.1.0 #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| on: | |
| push: | |
| tags: | |
| - v*.*.* | |
| jobs: | |
| build: | |
| name: ${{ matrix.job.name }} | |
| runs-on: ${{ matrix.job.os }} | |
| strategy: | |
| matrix: | |
| job: | |
| - name: macOS-x86_64 | |
| os: macos-26 | |
| target: x86_64-apple-darwin | |
| bundle: release/darwin/x86_64 | |
| arch: x64 | |
| - name: macOS-aarch64 | |
| os: macos-26 | |
| target: aarch64-apple-darwin | |
| bundle: release/darwin/aarch64 | |
| arch: aarch64 | |
| - name: Windows-x86_64 | |
| os: windows-2022 | |
| target: x86_64-pc-windows-msvc | |
| bundle: release/windows/x86_64 | |
| arch: x64 | |
| - name: Windows-aarch64 | |
| os: windows-11-arm | |
| target: aarch64-pc-windows-msvc | |
| bundle: release/windows/aarch64 | |
| arch: arm64 | |
| - name: Linux-x86_64 | |
| os: ubuntu-22.04 | |
| target: x86_64-unknown-linux-gnu | |
| bundle: release/linux/x86_64 | |
| arch: amd64 | |
| - name: Linux-aarch64 | |
| os: ubuntu-22.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| bundle: release/linux/aarch64 | |
| arch: aarch64 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| # TODO: Cache cargo, pnpm | |
| # Because each release uses a new tag, the cache can’t be hit. | |
| # https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#restrictions-for-accessing-a-cache | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: package.json | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| run_install: true | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| targets: ${{ matrix.job.target }} | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt update | |
| sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev xdg-utils -y | |
| sudo apt install libclang-dev libkrb5-dev -y | |
| - name: Get App version | |
| shell: bash | |
| run: | | |
| echo "APP_VERSION=$(node -p "require('./tauri.conf.json').version")" >> $GITHUB_ENV | |
| - name: Build App | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
| run: | | |
| pnpm build --target ${{ matrix.job.target }} | |
| - name: Organize App files (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| mkdir -p ${{ matrix.job.bundle }} | |
| mv target/${{ matrix.job.target }}/release/bundle/dmg/Dataflare_${{ env.APP_VERSION }}_${{ matrix.job.arch }}.dmg ${{ matrix.job.bundle }}/Dataflare.dmg | |
| mv target/${{ matrix.job.target }}/release/bundle/macos/Dataflare.app.tar.gz ${{ matrix.job.bundle }} | |
| echo '{"version":"${{ env.APP_VERSION }}","url":"https://assets.dataflare.app/${{ matrix.job.bundle }}/Dataflare.app.tar.gz","signature":"'$(cat target/${{ matrix.job.target }}/release/bundle/macos/Dataflare.app.tar.gz.sig)'"}' > ${{ matrix.job.bundle }}/latest.json | |
| cp ${{ matrix.job.bundle }}/Dataflare.dmg ${{ matrix.job.bundle }}/Dataflare-${{ env.APP_VERSION }}.dmg | |
| - name: Organize App files (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| mkdir -p ${{ matrix.job.bundle }} | |
| mv target/${{ matrix.job.target }}/release/bundle/appimage/Dataflare_${{ env.APP_VERSION }}_${{ matrix.job.arch }}.AppImage ${{ matrix.job.bundle }}/Dataflare.AppImage | |
| mv target/${{ matrix.job.target }}/release/bundle/appimage/Dataflare_${{ env.APP_VERSION }}_${{ matrix.job.arch }}.AppImage.tar.gz ${{ matrix.job.bundle }}/Dataflare.AppImage.tar.gz | |
| echo '{"version":"${{ env.APP_VERSION }}","url":"https://assets.dataflare.app/${{ matrix.job.bundle }}/Dataflare.AppImage.tar.gz","signature":"'$(cat target/${{ matrix.job.target }}/release/bundle/appimage/Dataflare_${{ env.APP_VERSION }}_${{ matrix.job.arch }}.AppImage.tar.gz.sig)'"}' > ${{ matrix.job.bundle }}/latest.json | |
| cp ${{ matrix.job.bundle }}/Dataflare.AppImage ${{ matrix.job.bundle }}/Dataflare-${{ env.APP_VERSION }}.AppImage | |
| - name: Organize App files (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| mkdir -p ${{ matrix.job.bundle }} | |
| mv target/${{ matrix.job.target }}/release/bundle/nsis/Dataflare_${{ env.APP_VERSION }}_${{ matrix.job.arch }}-setup.exe ${{ matrix.job.bundle }}/Dataflare-Setup.exe | |
| mv target/${{ matrix.job.target }}/release/bundle/nsis/Dataflare_${{ env.APP_VERSION }}_${{ matrix.job.arch }}-setup.nsis.zip ${{ matrix.job.bundle }}/Dataflare.zip | |
| echo '{"version":"${{ env.APP_VERSION }}","url":"https://assets.dataflare.app/${{ matrix.job.bundle }}/Dataflare.zip","signature":"'$(cat target/${{ matrix.job.target }}/release/bundle/nsis/Dataflare_${{ env.APP_VERSION }}_${{ matrix.job.arch }}-setup.nsis.zip.sig)'"}' > ${{ matrix.job.bundle }}/latest.json | |
| cp ${{ matrix.job.bundle }}/Dataflare-Setup.exe ${{ matrix.job.bundle }}/Dataflare-Setup-${{ env.APP_VERSION }}.exe | |
| - name: Upload to R2 | |
| uses: wyhaya/upload-cloudflare-r2@9ac9d847e87f5674ed5f14c11a2f0f44d8a5c368 | |
| with: | |
| account_id: ${{ secrets.R2_ACCOUNT_ID }} | |
| access_key_id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| bucket: ${{ secrets.R2_BUCKET }} | |
| source_directory: ${{ matrix.job.bundle }} | |
| destination_directory: ${{ matrix.job.bundle }} | |
| cache_control: | | |
| .* public, max-age=0, must-revalidate | |
| # Match any file with a version number | |
| (\d+\.)+\w+$ public, max-age=2678400, immutable |