Skip to content

chore: bump version to 0.1.3 #8

chore: bump version to 0.1.3

chore: bump version to 0.1.3 #8

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: ""
jobs:
build-cli:
name: Build CLI (${{ matrix.target }})
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
archive: tar.gz
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
archive: tar.gz
cross: true
- target: x86_64-apple-darwin
os: macos-latest
archive: tar.gz
- target: aarch64-apple-darwin
os: macos-latest
archive: tar.gz
- target: x86_64-pc-windows-msvc
os: windows-latest
archive: zip
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Install cross
if: matrix.cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build
env:
RUSTC_WRAPPER: ""
CROSS_CONTAINER_OPTS: "--env RUSTC_WRAPPER="
run: ${{ matrix.cross && 'cross' || 'cargo' }} build --release --target ${{ matrix.target }} -p reasondb-cli ${{ matrix.cross && '--features vendored-openssl' || '' }}
- name: Package (unix)
if: matrix.archive == 'tar.gz'
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../reasondb-${{ github.ref_name }}-${{ matrix.target }}.tar.gz reasondb
cd ../../..
- name: Package (windows)
if: matrix.archive == 'zip'
shell: pwsh
run: |
Compress-Archive -Path target/${{ matrix.target }}/release/reasondb.exe -DestinationPath reasondb-${{ github.ref_name }}-${{ matrix.target }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: reasondb-${{ matrix.target }}
path: reasondb-${{ github.ref_name }}-${{ matrix.target }}.*
release:
name: Create Release
needs: build-cli
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Generate checksums
run: |
cd artifacts
sha256sum reasondb-* > checksums-sha256.txt
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
artifacts/reasondb-*
artifacts/checksums-sha256.txt
build-desktop:
name: Build Desktop (${{ matrix.platform }})
needs: release
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
args: --target universal-apple-darwin
rust-targets: aarch64-apple-darwin,x86_64-apple-darwin
- platform: windows-latest
args: ''
rust-targets: ''
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: apps/reasondb-client/package-lock.json
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust-targets }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: apps/reasondb-client/src-tauri -> target
- name: Install frontend dependencies
working-directory: apps/reasondb-client
run: npm ci
- name: Build and release (Tauri)
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUSTC_WRAPPER: ''
NODE_OPTIONS: --max-old-space-size=4096
with:
projectPath: apps/reasondb-client
tagName: ${{ github.ref_name }}
releaseName: ReasonDB ${{ github.ref_name }}
releaseBody: |
See the assets below to download and install ReasonDB ${{ github.ref_name }}.
**macOS:** Download the `.dmg` file and drag ReasonDB into your Applications folder.
**Windows:** Download the `.msi` or `.exe` installer and run it.
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}
update-homebrew:
name: Update Homebrew Tap
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Clone tap repo
env:
TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: |
git clone "https://x-access-token:${TAP_TOKEN}@github.com/reasondb/homebrew-tap.git" tap
- name: Generate formula
run: |
cd tap
bash "${{ github.workspace }}/scripts/update-homebrew.sh" "${{ github.ref_name }}" "${{ github.workspace }}/artifacts"
- name: Push to tap
run: |
cd tap
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Formula/reasondb.rb
git commit -m "reasondb ${{ github.ref_name }}"
git push