Skip to content

Commit

Permalink
switch pipeline from travis to gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoenig134 committed Jan 24, 2022
1 parent 044cab2 commit e91980f
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 31 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish

on:
push:
tags: ["*"]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test

on:
pull_request:
branches: [master]
types: [opened, synchronize]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm ci
- run: npm run test:snyk
- run: npm run lint
- run: npm run build
- run: npm run test
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"type": "git",
"url": "https://github.com/markusbohl/fluent-ts-validator.git"
},
"main": "index.js",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"license": "MIT",
"devDependencies": {
"@types/jasmine": "2.5.54",
Expand All @@ -26,8 +27,13 @@
"tslint": "5.7.0",
"typescript": "2.5.2"
},
"files": [
"dist",
"README.md",
"CHANGELOG.md"
],
"scripts": {
"build": "rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build",
"build": "rimraf dist && tsc",
"lint": "tslint --config ./tslint.json --project ./tsconfig.json",
"tdd": "nodemon --watch src --ext ts --exec 'npm test'",
"test": "jasmine-ts 'src/**/*.spec.ts'",
Expand Down
5 changes: 0 additions & 5 deletions scripts/npm-publish.sh

This file was deleted.

4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"preserveConstEnums": true,
"sourceMap": true,
"declaration": true,
"outDir": "build",
"outDir": "dist",
"target": "ES6",
"strict": true
},
Expand All @@ -16,4 +16,4 @@
"node_modules",
"src/**/*.spec.ts"
]
}
}

0 comments on commit e91980f

Please sign in to comment.