From 2944fdfc3a640a7893630cd6fc39bac60df6d7a3 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 19 Oct 2022 18:16:32 -0700 Subject: [PATCH] ci: automatic release creation --- .github/workflows/CI.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8dbe23ed..e9fee942 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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