Skip to content

Commit 2944fdf

Browse files
committed
ci: automatic release creation
1 parent 61313e3 commit 2944fdf

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/CI.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- master
77
- main
88
- dev
9+
tags:
10+
- "*"
911

1012
jobs:
1113
Test:
@@ -59,18 +61,25 @@ jobs:
5961
6062
# Create self-contained executable that bundles Nodejs
6163
- name: Create Executable
62-
if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-20.04') || contains(matrix.os, 'macos-11')"
64+
if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12')"
6365
run: |
6466
pnpm run pack.exe
6567
66-
- name: Upload Executable
67-
if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-20.04') || contains(matrix.os, 'macos-11')"
68-
uses: actions/upload-artifact@v3
68+
# Draft the release
69+
- if: ${{ (github.event_name == 'tag') && contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12') }}
70+
uses: meeDamian/github-release@2.0
6971
with:
70-
path: |
71-
./exe
72-
./dist
73-
retention-days: 1
72+
token: ${{ secrets.GITHUB_TOKEN }}
73+
gzip: folders
74+
draft: true
75+
files: >
76+
./exe/setup_cpp_windows.exe
77+
./exe/setup_cpp_linux
78+
./exe/setup_cpp_mac
79+
./dist/node12/setup_cpp.js
80+
./dist/node12/setup_cpp.js.map
81+
./dist/node12/
82+
./dist/node16/
7483
7584
# - name: Setup SSH debugging session
7685
# uses: mxschmitt/action-tmate@v3

0 commit comments

Comments
 (0)