|
1 | 1 | name: App Builder |
2 | 2 | on: |
3 | | - workflow_dispatch: |
4 | | - push: |
5 | | - tags: |
6 | | - - "v*" |
7 | | - branches: |
8 | | - - master |
9 | | - - main |
10 | | - - release |
11 | | - - develop |
12 | | - - beta |
| 3 | + workflow_dispatch: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + branches: |
| 8 | + - master |
| 9 | + - main |
| 10 | + - release |
| 11 | + - develop |
| 12 | + - beta |
13 | 13 |
|
14 | 14 | env: |
15 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 15 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 16 | + RUST_TOOLCHAIN_VERSION: 1.79.0 |
16 | 17 |
|
17 | 18 | concurrency: |
18 | | - group: ${{ github.workflow }}-${{ github.ref }} |
19 | | - cancel-in-progress: true |
| 19 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 20 | + cancel-in-progress: true |
20 | 21 | permissions: |
21 | | - contents: write |
| 22 | + contents: write |
22 | 23 |
|
23 | 24 | jobs: |
24 | | - build: |
25 | | - strategy: |
26 | | - fail-fast: false |
27 | | - matrix: |
28 | | - node-version: [18.x] |
29 | | - platform: [windows-latest] |
30 | | - include: |
31 | | - #- os: ubuntu-latest |
32 | | - # rust_target: x86_64-unknown-linux-gnu |
33 | | - - os: windows-latest |
34 | | - rust_target: x86_64-pc-windows-msvc |
35 | | - #- os: macos-latest |
36 | | - # rust_target: x86_64-apple-darwin |
37 | | - #- os: macos-latest |
38 | | - # rust_target: aarch64-apple-darwin |
39 | | - runs-on: ${{ matrix.platform }} |
40 | | - steps: |
41 | | - - name: Checkout repository |
42 | | - uses: actions/checkout@v3 |
43 | | - with: |
44 | | - token: ${{ env.GITHUB_TOKEN }} |
| 25 | + build: |
| 26 | + strategy: |
| 27 | + fail-fast: false |
| 28 | + matrix: |
| 29 | + node-version: [18.x] |
| 30 | + platform: [windows-latest] |
| 31 | + include: |
| 32 | + #- os: ubuntu-latest |
| 33 | + # rust_target: x86_64-unknown-linux-gnu |
| 34 | + - os: windows-latest |
| 35 | + rust_target: x86_64-pc-windows-msvc |
| 36 | + #- os: macos-latest |
| 37 | + # rust_target: x86_64-apple-darwin |
| 38 | + #- os: macos-latest |
| 39 | + # rust_target: aarch64-apple-darwin |
| 40 | + runs-on: ${{ matrix.platform }} |
| 41 | + steps: |
| 42 | + - name: Checkout repository |
| 43 | + uses: actions/checkout@v3 |
| 44 | + with: |
| 45 | + token: ${{ env.GITHUB_TOKEN }} |
45 | 46 |
|
46 | | - - name: Node.js setup ${{ matrix.node-version }} |
47 | | - uses: actions/setup-node@v3 |
48 | | - with: |
49 | | - node-version: ${{ matrix.node-version }} |
50 | | - # node-version-file: '.nvmrc' |
| 47 | + - name: Node.js setup ${{ matrix.node-version }} |
| 48 | + uses: actions/setup-node@v3 |
| 49 | + with: |
| 50 | + node-version: ${{ matrix.node-version }} |
| 51 | + # node-version-file: '.nvmrc' |
51 | 52 |
|
52 | | - - name: "Setup Rust" |
53 | | - uses: actions-rs/toolchain@v1 |
54 | | - with: |
55 | | - default: true |
56 | | - override: true |
57 | | - profile: minimal |
58 | | - toolchain: stable |
59 | | - target: ${{ matrix.platform.rust_target }} |
| 53 | + - name: 'Setup Rust' |
| 54 | + uses: actions-rs/toolchain@v1 |
| 55 | + with: |
| 56 | + default: true |
| 57 | + override: true |
| 58 | + profile: minimal |
| 59 | + toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} |
| 60 | + target: ${{ matrix.platform.rust_target }} |
60 | 61 |
|
61 | | - - uses: Swatinem/rust-cache@v2 |
| 62 | + - uses: Swatinem/rust-cache@v2 |
62 | 63 |
|
63 | | - - name: Install dependencies (ubuntu only) |
64 | | - if: matrix.platform == 'ubuntu-latest' |
65 | | - run: | |
66 | | - sudo apt-get update |
67 | | - sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf |
68 | | - npm install -g pnpm |
69 | | - npm install -g typescript |
| 64 | + - name: Install dependencies (ubuntu only) |
| 65 | + if: matrix.platform == 'ubuntu-latest' |
| 66 | + run: | |
| 67 | + sudo apt-get update |
| 68 | + sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf |
| 69 | + npm install -g pnpm |
| 70 | + npm install -g typescript |
70 | 71 |
|
71 | | - - name: install dependencies (windows only) |
72 | | - if: matrix.platform == 'windows-latest' |
73 | | - run: | |
74 | | - npm install -g typescript |
75 | | - npm install -g pnpm |
| 72 | + - name: install dependencies (windows only) |
| 73 | + if: matrix.platform == 'windows-latest' |
| 74 | + run: | |
| 75 | + npm install -g typescript |
| 76 | + npm install -g pnpm |
76 | 77 |
|
77 | | - - name: Install dependencies (PNPM) |
78 | | - run: pnpm install --no-frozen-lockfile |
| 78 | + - name: Install dependencies (PNPM) |
| 79 | + run: pnpm install --no-frozen-lockfile |
79 | 80 |
|
80 | | - - name: Generate Local Plugins (PNPM) |
81 | | - run: pnpm run specta:gen |
| 81 | + - name: Generate Local Plugins (PNPM) |
| 82 | + run: pnpm run specta:gen |
82 | 83 |
|
83 | | - - uses: JonasKruckenberg/tauri-build@v1.2.3 |
84 | | - id: tauri_build |
85 | | - with: |
86 | | - target: ${{ matrix.platform.rust_target }} |
| 84 | + - uses: JonasKruckenberg/tauri-build@v1.2.3 |
| 85 | + id: tauri_build |
| 86 | + with: |
| 87 | + target: ${{ matrix.platform.rust_target }} |
87 | 88 |
|
88 | | - - uses: actions/upload-artifact@v3 |
89 | | - with: |
90 | | - name: production-files |
91 | | - path: "${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n') }}" |
| 89 | + - uses: actions/upload-artifact@v3 |
| 90 | + with: |
| 91 | + name: production-files |
| 92 | + path: "${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n') }}" |
92 | 93 |
|
93 | | - deploy: |
94 | | - runs-on: ubuntu-latest |
95 | | - name: Deploy |
96 | | - needs: [build] |
97 | | - steps: |
98 | | - - name: Checkout |
99 | | - uses: actions/checkout@v3 |
100 | | - with: |
101 | | - fetch-depth: 0 |
102 | | - - name: Create Directory |
103 | | - run: mkdir -p dist |
104 | | - - name: Download artifact |
105 | | - uses: actions/download-artifact@v2 |
106 | | - with: |
107 | | - name: production-files |
108 | | - path: ./dist |
109 | | - - name: Setup node |
110 | | - uses: actions/setup-node@v3 |
111 | | - with: |
112 | | - node-version: 18 |
113 | | - - run: npm install -g conventional-changelog-conventionalcommits@6 |
114 | | - - run: npm install -g semantic-release@v19.0.5 |
115 | | - - run: npm install -g @semantic-release/exec |
116 | | - - run: npm install -g @semantic-release/git |
117 | | - - run: npm install -g @semantic-release/release-notes-generator |
118 | | - - run: npm install -g @semantic-release/changelog |
119 | | - - run: npm install -g @semantic-release/github |
120 | | - - name: Release |
121 | | - env: |
122 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
123 | | - run: | |
124 | | - sudo apt-get install -y jq |
125 | | - chmod +x ./.github/scripts/prepareCMD.sh |
126 | | - semantic-release |
| 94 | + deploy: |
| 95 | + runs-on: ubuntu-latest |
| 96 | + name: Deploy |
| 97 | + needs: [build] |
| 98 | + steps: |
| 99 | + - name: Checkout |
| 100 | + uses: actions/checkout@v3 |
| 101 | + with: |
| 102 | + fetch-depth: 0 |
| 103 | + - name: Create Directory |
| 104 | + run: mkdir -p dist |
| 105 | + - name: Download artifact |
| 106 | + uses: actions/download-artifact@v2 |
| 107 | + with: |
| 108 | + name: production-files |
| 109 | + path: ./dist |
| 110 | + - name: Setup node |
| 111 | + uses: actions/setup-node@v3 |
| 112 | + with: |
| 113 | + node-version: 18 |
| 114 | + - run: npm install -g conventional-changelog-conventionalcommits@6 |
| 115 | + - run: npm install -g semantic-release@v19.0.5 |
| 116 | + - run: npm install -g @semantic-release/exec |
| 117 | + - run: npm install -g @semantic-release/git |
| 118 | + - run: npm install -g @semantic-release/release-notes-generator |
| 119 | + - run: npm install -g @semantic-release/changelog |
| 120 | + - run: npm install -g @semantic-release/github |
| 121 | + - name: Release |
| 122 | + env: |
| 123 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 124 | + run: | |
| 125 | + sudo apt-get install -y jq |
| 126 | + chmod +x ./.github/scripts/prepareCMD.sh |
| 127 | + semantic-release |
127 | 128 |
|
128 | | - cleanup: |
129 | | - name: Cleanup actions |
130 | | - needs: |
131 | | - - deploy |
132 | | - runs-on: ubuntu-latest |
133 | | - timeout-minutes: 10 |
134 | | - steps: |
135 | | - - name: "♻️ remove build artifacts" |
136 | | - uses: geekyeggo/delete-artifact@v1 |
137 | | - with: |
138 | | - name: production-files |
| 129 | + cleanup: |
| 130 | + name: Cleanup actions |
| 131 | + needs: |
| 132 | + - deploy |
| 133 | + runs-on: ubuntu-latest |
| 134 | + timeout-minutes: 10 |
| 135 | + steps: |
| 136 | + - name: '♻️ remove build artifacts' |
| 137 | + uses: geekyeggo/delete-artifact@v1 |
| 138 | + with: |
| 139 | + name: production-files |
0 commit comments