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 name: Build and Publish
on:
push:
branches: ['main']
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -23,32 +21,18 @@ jobs:
name: Compile Typescript name: Compile Typescript
- run: yarn test - run: yarn test
name: Run tests 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: env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}} CI: true
- name: Publish if version has been updated
publish-gpr: uses: pascalgn/npm-publish-action@1.3.6
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with: with:
node-version: 14 tag_name: "v%s"
registry-url: https://npm.pkg.github.com/ tag_message: "v%s"
scope: '@butlerx' create_tag: "true"
- run: yarn commit_pattern: "^Release (\\S+)"
- run: yarn publish --non-interactive workspace: "."
publish_command: "yarn"
publish_args: "--non-interactive"
env: 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: on:
push:
branches:
- main
pull_request: pull_request:
name: Run tests
jobs: jobs:
build_and_test: build_and_test:
runs-on: ubuntu-latest runs-on: ubuntu-latest

2
src/server/command/ssh.ts

@ -18,7 +18,7 @@ export function sshOptions(
const hostChecking = knownHosts !== '/dev/null' ? 'yes' : 'no'; const hostChecking = knownHosts !== '/dev/null' ? 'yes' : 'no';
logger.info(`Authentication Type: ${auth}`); logger.info(`Authentication Type: ${auth}`);
let sshRemoteOptsBase = ['ssh', host, '-t']; let sshRemoteOptsBase = ['ssh', host, '-t'];
if (config !== '') { if (!isUndefined(config) && config !== '') {
sshRemoteOptsBase = sshRemoteOptsBase.concat(['-F', config]); sshRemoteOptsBase = sshRemoteOptsBase.concat(['-F', config]);
} }
sshRemoteOptsBase = sshRemoteOptsBase.concat([ sshRemoteOptsBase = sshRemoteOptsBase.concat([

Loading…
Cancel
Save