Skip to content

Commit 40e4f07

Browse files
Merge branch 'develop'
2 parents cbd8da4 + 4b37f53 commit 40e4f07

91 files changed

Lines changed: 20262 additions & 527 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/github-actions-demo.yml

Lines changed: 100 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,121 @@ on:
44
push:
55
branches:
66
- main
7+
- develop
78
pull_request:
89
branches:
910
- main
1011
env:
1112
CARGO_TERM_COLOR: always
1213
jobs:
13-
build:
14+
linux:
1415
permissions:
1516
contents: write
16-
runs-on: windows-latest
17+
runs-on: ubuntu-22.04
1718
steps:
1819
- uses: actions/checkout@v3
20+
- name: Install System Packages
21+
run: sudo apt update && sudo apt install -y build-essential pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev libsoup-3.0-dev
1922
- name: Install Cargo Toolchain
2023
run: rustup install nightly
21-
- name: Build
22-
run: cargo +nightly build --release
23-
- name: Generate Commit Hash
24-
run: echo ${{ github.sha }} > Release.txt
25-
- name: Generate Env Vars Version
26-
run: echo RUBIC_VERSION=${{ github.sha }} > .env
27-
- name: Generate Env Vars Port
28-
run: echo RUBIC_PORT=3000 >> .env
29-
- name: Generate Env Vars Max Peers
30-
run: echo RUBIC_MAX_PEERS=9 >> .env
31-
- name: Generate Env Vars Min Peers
32-
run: echo RUBIC_MIN_PEERS=3 >> .env
33-
- name: Generate Env Vars Log Level
34-
run: echo RUBIC_LOG_LEVEL=error >> .env
35-
- name: Zip UI for deployment
36-
run: tar.exe -a -c -f ui.zip ui/*
24+
- name: Install Tauri
25+
run: cargo install tauri-cli --version "^2.0.0" --locked
26+
- name: Build Frontend
27+
run: cd frontend && yarn install --network-timeout 1000000000 && yarn build && cd ..
28+
- name: Build Rubic
29+
run: cargo tauri build --no-bundle
30+
- name: Bundle Rubic
31+
run: cargo tauri bundle --bundles deb
32+
- name: View App Artifacts Dir
33+
run: ls src-tauri/target/release/
34+
- name: View App Artifacts Bundle Dir
35+
run: ls src-tauri/target/release/bundle/
3736
- name: Generate release tag
3837
id: tag
3938
run: |
4039
echo "::set-output name=release_tag::Release_$(date +"%Y.%m.%d_%H-%M")"
41-
- name: Publish Release
42-
uses: softprops/action-gh-release@v1
40+
- uses: actions/upload-artifact@v4
4341
with:
44-
tag_name: ${{ steps.tag.outputs.release_tag }}
45-
files: |
46-
target/release/rubic.exe
47-
LICENSE
48-
Release.txt
49-
ui.zip
42+
name: Rubic-linux
43+
path: src-tauri/target/release/bundle/deb/Rubic_1.0.0_amd64.deb
5044
- run: echo "🍏 This job's status is ${{ job.status }}."
45+
mac:
46+
permissions:
47+
contents: write
48+
runs-on: macos-14
49+
steps:
50+
- uses: actions/checkout@v3
51+
- name: Install Cargo Toolchain
52+
run: rustup install nightly
53+
- name: Install Tauri
54+
run: cargo install tauri-cli --version "^2.0.0" --locked
55+
- name: Build Frontend
56+
run: cd frontend && yarn install --network-timeout 1000000000 && yarn build && cd ..
57+
- name: Build Rubic
58+
run: cargo tauri build --no-bundle
59+
- name: Bundle Rubic
60+
run: cargo tauri bundle --bundles app
61+
- name: Remove Quarantine Attribute
62+
run: sudo xattr -rd com.apple.quarantine src-tauri/target/release/bundle/macos/Rubic.app
63+
- name: Zip App Bundle
64+
run: cd src-tauri/target/release/bundle/macos/ && zip -9 -y -r -q Rubic-macos.zip Rubic.app && cd ../../../../..
65+
- name: Generate release tag
66+
id: tag
67+
run: |
68+
echo "::set-output name=release_tag::Release_$(date +"%Y.%m.%d_%H-%M")"
69+
- uses: actions/upload-artifact@v4
70+
with:
71+
name: Rubic-macos
72+
path: src-tauri/target/release/bundle/macos/Rubic-macos.zip
73+
- run: echo "🍏 This job's status is ${{ job.status }}."
74+
windows:
75+
permissions:
76+
contents: write
77+
runs-on: windows-latest
78+
steps:
79+
- uses: actions/checkout@v3
80+
- name: Install Cargo Toolchain
81+
run: rustup install nightly
82+
- name: Install Tauri
83+
run: cargo install tauri-cli --version "^2.0.0" --locked
84+
- name: Build Frontend
85+
run: cd frontend; yarn install --network-timeout 1000000000; yarn build; cd ..;
86+
- name: Build Rubic
87+
run: cargo tauri build
88+
- name: Generate Commit Hash
89+
run: echo ${{ github.sha }} > Release.txt
90+
- name: Generate Env Vars Version
91+
run: echo RUBIC_VERSION=${{ github.sha }} > .env
92+
- name: Generate Env Vars Port
93+
run: echo RUBIC_PORT=3000 >> .env
94+
- name: Generate Env Vars Max Peers
95+
run: echo RUBIC_MAX_PEERS=7 >> .env
96+
- name: Generate Env Vars Min Peers
97+
run: echo RUBIC_MIN_PEERS=3 >> .env
98+
- name: Generate Env Vars Log Level
99+
run: echo RUBIC_LOG_LEVEL=error >> .env
100+
- name: Show current dir files
101+
run: dir src-tauri/target/release
102+
- name: Generate release tag
103+
id: tag
104+
run: |
105+
echo "::set-output name=release_tag::Release_$(date +"%Y.%m.%d_%H-%M")"
106+
- uses: actions/download-artifact@v4
107+
with:
108+
name: Rubic-macos
109+
path: ./mac/
110+
- uses: actions/download-artifact@v4
111+
with:
112+
name: Rubic-linux
113+
path: ./linux/
114+
- name: Publish Release
115+
uses: softprops/action-gh-release@v1
116+
with:
117+
tag_name: ${{ steps.tag.outputs.release_tag }}
118+
files: |
119+
src-tauri/target/release/Rubic.exe
120+
linux/Rubic_1.0.0_amd64.deb
121+
mac/Rubic-macos.zip
122+
LICENSE
123+
Release.txt
124+
- run: echo "🍏 This job's status is ${{ job.status }}."

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
.idea
2-
2+
src-tauri/gen
3+
src-tauri/capabilities
4+
dist
5+
node_modules
36

47

58
# Generated by Cargo
@@ -9,7 +12,7 @@ target/
912

1013
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
1114
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
12-
Cargo.lock
15+
tauri/Cargo.lock
1316

1417
# These are backup files generated by rustfmt
1518
**/*.rs.bk

0 commit comments

Comments
 (0)