diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5580771..fd9ea8b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,10 +1,8 @@ --- -on: - release: - types: - - published - name: Build and Publish +on: + push: + branches: ['main'] jobs: build: runs-on: ubuntu-latest @@ -23,32 +21,18 @@ jobs: name: Compile Typescript - run: yarn test name: Run tests - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 14 - registry-url: https://registry.npmjs.org/ - - run: yarn - - run: yarn publish --non-interactive env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + CI: true + - name: Publish if version has been updated + uses: pascalgn/npm-publish-action@1.3.6 with: - node-version: 14 - registry-url: https://npm.pkg.github.com/ - scope: '@butlerx' - - run: yarn - - run: yarn publish --non-interactive + tag_name: "v%s" + tag_message: "v%s" + create_tag: "true" + commit_pattern: "^Release (\\S+)" + workspace: "." + publish_command: "yarn" + publish_args: "--non-interactive" env: - NODE_AUTH_TOKEN: ${{secrets.node_github_token}} + GITHUB_TOKEN: ${{ secrets.node_github_token }} + NPM_AUTH_TOKEN: ${{ secrets.npm_token }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13c7bdc..0da690f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,11 +1,7 @@ --- +name: Run tests on: - push: - branches: - - main pull_request: - -name: Run tests jobs: build_and_test: runs-on: ubuntu-latest diff --git a/src/server/command/ssh.ts b/src/server/command/ssh.ts index c1b24c2..288a591 100644 --- a/src/server/command/ssh.ts +++ b/src/server/command/ssh.ts @@ -18,7 +18,7 @@ export function sshOptions( const hostChecking = knownHosts !== '/dev/null' ? 'yes' : 'no'; logger.info(`Authentication Type: ${auth}`); let sshRemoteOptsBase = ['ssh', host, '-t']; - if (config !== '') { + if (!isUndefined(config) && config !== '') { sshRemoteOptsBase = sshRemoteOptsBase.concat(['-F', config]); } sshRemoteOptsBase = sshRemoteOptsBase.concat([