|
6 | 6 | - master
|
7 | 7 | - main
|
8 | 8 | - dev
|
| 9 | + tags: |
| 10 | + - "*" |
9 | 11 |
|
10 | 12 | jobs:
|
11 | 13 | Test:
|
|
23 | 25 | - macos-12
|
24 | 26 | - macos-11
|
25 | 27 | node:
|
26 |
| - - 14 # installed on the images |
| 28 | + - 16 |
27 | 29 | pnpm:
|
28 | 30 | - 7
|
29 | 31 | cache_reset_counter:
|
@@ -57,29 +59,57 @@ jobs:
|
57 | 59 | run: |
|
58 | 60 | pnpm install
|
59 | 61 |
|
| 62 | + # - name: Setup SSH debugging session |
| 63 | + # uses: mxschmitt/action-tmate@v3 |
| 64 | + |
| 65 | + - name: Test |
| 66 | + if: "!contains(github.event.head_commit.message, '[skip ci test]')" |
| 67 | + run: | |
| 68 | + pnpm run test |
| 69 | + continue-on-error: ${{ contains(matrix.os, 'ubuntu-18.04') }} |
| 70 | + |
60 | 71 | # Create self-contained executable that bundles Nodejs
|
61 | 72 | - name: Create Executable
|
62 |
| - if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-20.04') || contains(matrix.os, 'macos-11')" |
| 73 | + if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12')" |
63 | 74 | run: |
|
64 | 75 | pnpm run pack.exe
|
65 | 76 |
|
66 |
| - - name: Upload Executable |
67 |
| - if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-20.04') || contains(matrix.os, 'macos-11')" |
| 77 | + - name: Upload Artifacts |
| 78 | + if: ${{ (startsWith(github.ref, 'refs/tags/')) && contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12') }} |
68 | 79 | uses: actions/upload-artifact@v3
|
69 | 80 | with:
|
70 | 81 | path: |
|
71 | 82 | ./exe
|
72 | 83 | ./dist
|
73 | 84 | retention-days: 1
|
74 | 85 |
|
75 |
| - # - name: Setup SSH debugging session |
76 |
| - # uses: mxschmitt/action-tmate@v3 |
| 86 | + Release: |
| 87 | + needs: Test |
| 88 | + if: startsWith(github.ref, 'refs/tags/') |
| 89 | + runs-on: ubuntu-22.04 |
| 90 | + steps: |
| 91 | + - name: Download Artifacts |
| 92 | + uses: actions/download-artifact@v3 |
77 | 93 |
|
78 |
| - - name: Test |
79 |
| - if: "!contains(github.event.head_commit.message, '[skip ci test]')" |
| 94 | + - name: Place Artifacts |
80 | 95 | run: |
|
81 |
| - pnpm run test |
82 |
| - continue-on-error: ${{ contains(matrix.os, 'ubuntu-18.04') }} |
| 96 | + mv -v artifact/* ./ |
| 97 | + chmod +x -R ./exe/ |
| 98 | +
|
| 99 | + - name: Draft the release |
| 100 | + |
| 101 | + with: |
| 102 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 103 | + gzip: folders |
| 104 | + draft: true |
| 105 | + files: > |
| 106 | + ./exe/setup_cpp_windows.exe |
| 107 | + ./exe/setup_cpp_linux |
| 108 | + ./exe/setup_cpp_mac |
| 109 | + ./dist/node12/setup_cpp.js |
| 110 | + ./dist/node12/setup_cpp.js.map |
| 111 | + ./dist/node12/ |
| 112 | + ./dist/node16/ |
83 | 113 |
|
84 | 114 | Docker:
|
85 | 115 | if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip docker]') }}
|
|
0 commit comments