Skip to content

Commit

Permalink
setup ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nmeylan committed Jun 28, 2024
1 parent 8145864 commit 95b7362
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 1 deletion.
File renamed without changes
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Release

on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Define the release version"
required: true
default: ""

jobs:
build-and-upload:
name: Build and upload
runs-on: ${{ matrix.os }}

strategy:
matrix:
# You can add more, for any target you'd like!
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu

- build: macos
os: macos-latest
target: x86_64-apple-darwin

- build: win-amd64
os: windows-latest
target: x86_64-pc-windows-msvc

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${{ github.event.inputs.releaseVersion }}" >> $GITHUB_ENV

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Setup Cache
uses: Swatinem/rust-cache@v2

- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --verbose --release --target ${{ matrix.target }}

- name: Build archive
shell: bash
run: |
# Replace with the name of your binary
binary_name="json-editor"
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
mkdir "$dirname"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
else
mv "target/${{ matrix.target }}/release/$binary_name" "$dirname"
fi
echo "ASSET=$dirname" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.ASSET }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- Go to row number
- Search for matching terms

![](./github/json-editor.png)
![](.github/json-editor.png)

Json in video below is 372mb with an array of 309_759 entries, containing nested objects, it runs at ~60fps

Expand Down

0 comments on commit 95b7362

Please sign in to comment.