|
1 | | -name: publish binaries and napi modules |
| 1 | +name: publish napi modules |
2 | 2 |
|
3 | 3 | env: |
4 | 4 | DEBUG: napi:* |
|
15 | 15 |
|
16 | 16 | jobs: |
17 | 17 | build: |
18 | | - strategy: |
19 | | - fail-fast: false |
20 | | - matrix: |
21 | | - settings: |
22 | | - - host: macos-latest |
23 | | - target: x86_64-apple-darwin |
24 | | - - host: macos-latest |
25 | | - target: aarch64-apple-darwin |
26 | | - - host: windows-latest |
27 | | - target: x86_64-pc-windows-msvc |
28 | | - ext: .exe |
29 | | - - host: windows-latest |
30 | | - target: i686-pc-windows-msvc |
31 | | - ext: .exe |
32 | | - - host: ubuntu-18.04 |
33 | | - target: x86_64-unknown-linux-gnu |
34 | | - - host: ubuntu-18.04 |
35 | | - target: x86_64-unknown-linux-musl |
36 | | - - host: ubuntu-18.04 |
37 | | - target: aarch64-unknown-linux-gnu |
38 | | - - host: ubuntu-18.04 |
39 | | - target: armv7-unknown-linux-gnueabihf |
40 | | - setup: | |
41 | | - sudo apt-get update |
42 | | - sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y |
43 | | - - host: ubuntu-18.04 |
44 | | - target: aarch64-unknown-linux-musl |
45 | | - |
46 | | - name: ${{ matrix.settings.target }} |
47 | | - runs-on: ${{ matrix.settings.host }} |
48 | | - steps: |
49 | | - - uses: actions/checkout@v3 |
50 | | - |
51 | | - - uses: actions-rs/toolchain@v1 |
52 | | - with: |
53 | | - profile: minimal |
54 | | - override: true |
55 | | - toolchain: stable |
56 | | - target: ${{ matrix.settings.target }} |
57 | | - |
58 | | - - name: setup system dependencies |
59 | | - run: ${{ matrix.settings.setup }} |
60 | | - if: ${{ matrix.settings.setup }} |
61 | | - shell: bash |
62 | | - |
63 | | - - name: build |
64 | | - uses: actions-rs/cargo@v1 |
65 | | - with: |
66 | | - command: build |
67 | | - args: --release |
68 | | - |
69 | | - - name: upload artifact |
70 | | - uses: actions/upload-artifact@v3 |
71 | | - with: |
72 | | - name: "${{ matrix.settings.target }}" |
73 | | - path: "target/release/create-tauri-app${{ matrix.settings.ext }}" |
74 | | - if-no-files-found: error |
75 | | - |
76 | | - build-napi: |
77 | 18 | defaults: |
78 | 19 | run: |
79 | 20 | working-directory: node |
@@ -217,39 +158,6 @@ jobs: |
217 | 158 | if-no-files-found: error |
218 | 159 |
|
219 | 160 | publish: |
220 | | - needs: |
221 | | - - build |
222 | | - runs-on: ubuntu-latest |
223 | | - steps: |
224 | | - - uses: actions/checkout@v3 |
225 | | - |
226 | | - - name: download all artifacts |
227 | | - uses: actions/download-artifact@v3 |
228 | | - with: |
229 | | - path: binaries |
230 | | - |
231 | | - - name: rename files |
232 | | - working-directory: binaries |
233 | | - shell: bash |
234 | | - run: | |
235 | | - find . -name 'create-tauri-app*' -print0 | while read -d '' file |
236 | | - do |
237 | | - parent="$(basename $(dirname ${file}))" |
238 | | - target="${file#./}" |
239 | | - target="${target/create-tauri-app/create-tauri-app-${parent}}" |
240 | | - target="${target/${parent}\//}" |
241 | | - mv $file $target |
242 | | - done |
243 | | - find . -type d -empty -delete |
244 | | -
|
245 | | - - uses: xresloader/upload-to-github-release@v1 |
246 | | - env: |
247 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
248 | | - with: |
249 | | - release_id: "${{ inputs.releasedId }}" |
250 | | - file: "binaries/*" |
251 | | - |
252 | | - publish-napi: |
253 | 161 | defaults: |
254 | 162 | run: |
255 | 163 | working-directory: node |
|
0 commit comments