diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e9fee942..c5664e2c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,14 +59,45 @@ jobs: run: | pnpm install + # - name: Setup SSH debugging session + # uses: mxschmitt/action-tmate@v3 + + - name: Test + if: "!contains(github.event.head_commit.message, '[skip ci test]')" + run: | + pnpm run test + continue-on-error: ${{ contains(matrix.os, 'ubuntu-18.04') }} + # Create self-contained executable that bundles Nodejs - name: Create Executable if: "contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12')" run: | pnpm run pack.exe - # Draft the release - - if: ${{ (github.event_name == 'tag') && contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12') }} + - name: Upload Artifacts + if: ${{ (github.event_name == 'tag') && contains(matrix.os, 'windows-2022') || contains(matrix.os, 'ubuntu-22.04') || contains(matrix.os, 'macos-12') }} + uses: actions/upload-artifact@v3 + with: + path: | + ./exe + ./dist + retention-days: 1 + + Release: + needs: Test + if: ${{ (github.event_name == 'release') }} + runs-on: ubuntu-22.04 + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + + - name: Place Artifacts + run: | + mv -v artifact/* ./ + mv -v artifact/.[^.]* ./ + chmod +x -R ./exe/ + + - name: Draft the release uses: meeDamian/github-release@2.0 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -81,15 +112,6 @@ jobs: ./dist/node12/ ./dist/node16/ - # - name: Setup SSH debugging session - # uses: mxschmitt/action-tmate@v3 - - - name: Test - if: "!contains(github.event.head_commit.message, '[skip ci test]')" - run: | - pnpm run test - continue-on-error: ${{ contains(matrix.os, 'ubuntu-18.04') }} - Docker: if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip docker]') }} runs-on: ${{ matrix.os }}