ci: automatic release creation

This commit is contained in:
Amin Yahyaabadi 2022-10-19 18:16:32 -07:00
parent 61313e30d5
commit 2944fdfc3a
1 changed files with 17 additions and 8 deletions

View File

@ -6,6 +6,8 @@ on:
- master
- main
- dev
tags:
- "*"
jobs:
Test:
@ -59,18 +61,25 @@ jobs:
# Create self-contained executable that bundles Nodejs
- name: Create Executable
if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-20.04') || contains(matrix.os, 'macos-11')"
if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12')"
run: |
pnpm run pack.exe
- name: Upload Executable
if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-20.04') || contains(matrix.os, 'macos-11')"
uses: actions/upload-artifact@v3
# Draft the release
- if: ${{ (github.event_name == 'tag') && contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12') }}
uses: meeDamian/github-release@2.0
with:
path: |
./exe
./dist
retention-days: 1
token: ${{ secrets.GITHUB_TOKEN }}
gzip: folders
draft: true
files: >
./exe/setup_cpp_windows.exe
./exe/setup_cpp_linux
./exe/setup_cpp_mac
./dist/node12/setup_cpp.js
./dist/node12/setup_cpp.js.map
./dist/node12/
./dist/node16/
# - name: Setup SSH debugging session
# uses: mxschmitt/action-tmate@v3