Skip to content

Commit 0adf109

Browse files
committed
setup ci
1 parent 8145864 commit 0adf109

5 files changed

+72
-1
lines changed
File renamed without changes.

.github/workflows/release.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
build-and-upload:
10+
name: Build and upload
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
# You can add more, for any target you'd like!
16+
include:
17+
- build: linux
18+
os: ubuntu-latest
19+
target: x86_64-unknown-linux-gnu
20+
21+
- build: macos
22+
os: macos-latest
23+
target: x86_64-apple-darwin
24+
25+
- build: win-amd64
26+
os: windows-latest
27+
target: x86_64-pc-windows-msvc
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
33+
- name: Get the release version from the tag
34+
shell: bash
35+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
36+
37+
- name: Install Rust
38+
uses: dtolnay/rust-toolchain@stable
39+
with:
40+
targets: ${{ matrix.target }}
41+
42+
- name: Setup Cache
43+
uses: Swatinem/rust-cache@v2
44+
45+
- name: Build
46+
uses: actions-rs/cargo@v1
47+
with:
48+
use-cross: true
49+
command: build
50+
args: --verbose --release --target ${{ matrix.target }}
51+
52+
- name: Build archive
53+
shell: bash
54+
run: |
55+
# Replace with the name of your binary
56+
binary_name="json-editor"
57+
58+
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
59+
mkdir "$dirname"
60+
if [ "${{ matrix.os }}" = "windows-latest" ]; then
61+
mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
62+
else
63+
mv "target/${{ matrix.target }}/release/$binary_name" "$dirname"
64+
fi
65+
echo "ASSET=$dirname" >> $GITHUB_ENV
66+
67+
- name: Release
68+
uses: softprops/action-gh-release@v1
69+
with:
70+
files: |
71+
${{ env.ASSET }}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- Go to row number
1717
- Search for matching terms
1818

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

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

0 commit comments

Comments
 (0)