|
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - main |
| 7 | + - develop |
7 | 8 | pull_request: |
8 | 9 | branches: |
9 | 10 | - main |
10 | 11 | env: |
11 | 12 | CARGO_TERM_COLOR: always |
12 | 13 | jobs: |
13 | | - build: |
| 14 | + linux: |
14 | 15 | permissions: |
15 | 16 | contents: write |
16 | | - runs-on: windows-latest |
| 17 | + runs-on: ubuntu-22.04 |
17 | 18 | steps: |
18 | 19 | - 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 |
19 | 22 | - name: Install Cargo Toolchain |
20 | 23 | 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/ |
37 | 36 | - name: Generate release tag |
38 | 37 | id: tag |
39 | 38 | run: | |
40 | 39 | 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 |
43 | 41 | 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 |
50 | 44 | - 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 }}." |
0 commit comments