Browse Source
update release flow to use commit messages
pull/331/head
butlerx
4 years ago
No known key found for this signature in database
GPG Key ID: B37CA765BAA89170
3 changed files with
17 additions and
37 deletions
-
.github/workflows/publish.yml
-
.github/workflows/test.yml
-
src/server/command/ssh.ts
|
|
@ -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 }} |
|
|
|
|
|
@ -1,11 +1,7 @@ |
|
|
|
--- |
|
|
|
name: Run tests |
|
|
|
on: |
|
|
|
push: |
|
|
|
branches: |
|
|
|
- main |
|
|
|
pull_request: |
|
|
|
|
|
|
|
name: Run tests |
|
|
|
jobs: |
|
|
|
build_and_test: |
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
@ -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([ |
|
|
|