Browse Source

update release flow to use commit messages

pull/331/head
butlerx 4 years ago
parent
commit
544a943344
No known key found for this signature in database GPG Key ID: B37CA765BAA89170
  1. 46
      .github/workflows/publish.yml
  2. 6
      .github/workflows/test.yml
  3. 2
      src/server/command/ssh.ts

46
.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 }}

6
.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

2
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([

Loading…
Cancel
Save