From 1a170727a8d328191dff502d65548f60b076ef65 Mon Sep 17 00:00:00 2001 From: Kev Baldwyn Date: Sun, 20 Dec 2020 00:17:07 +0000 Subject: [PATCH] ci: prep for release --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ package.json | 13 +++++++++---- src/Scalars/index.ts | 5 +++++ src/index.ts | 3 +++ tsconfig.json | 2 +- 5 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 src/Scalars/index.ts create mode 100644 src/index.ts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9c9514a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release +on: + push: + branches: + - master +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Install dependencies + run: npm install + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release diff --git a/package.json b/package.json index 94604fc..880116d 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,12 @@ { "name": "ts-valueobjects", - "version": "0.1.0", - "description": "Typescript typesafe Value Objects made easy", + "version": "0.0.0-development", + "description": "Typescript typesafe Value Objects and Domain Value Objects made easy", "keywords": [ "typescript", - "value objects" + "value objects", + "ddd", + "domain objects" ], "author": { "name": "Kevin Baldwyn", @@ -33,7 +35,9 @@ "test:watch": "jest --watch", "test:mutations": "stryker run", "upgrade": "npx npm-check -u", - "version": "npm run build && npm run changelog:update" + "version": "npm run build && npm run changelog:update", + "prepare": "npm test && npm run build", + "semantic-release": "semantic-release" }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.1", @@ -58,6 +62,7 @@ "jest": "^26.6.3", "prettier": "2.2.1", "prettier-eslint": "^12.0.0", + "semantic-release": "^17.3.0", "source-map-support": "^0.5.12", "ts-jest": "^26.4.4", "ts-node": "^9.0.0", diff --git a/src/Scalars/index.ts b/src/Scalars/index.ts new file mode 100644 index 0000000..e7fac28 --- /dev/null +++ b/src/Scalars/index.ts @@ -0,0 +1,5 @@ +export * from "./BooleanScalar"; +export * from "./FloatScalar"; +export * from "./IntegerScalar"; +export * from "./NullScalar"; +export * from "./StringScalar"; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..b6a1cc5 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,3 @@ +export * from "./Scalars"; +export * from "./ValueObject"; +export * from "./EnumValueObject"; diff --git a/tsconfig.json b/tsconfig.json index 999e3ee..25c4e24 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -61,5 +61,5 @@ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ }, - "exclude": [ "node_modules", "test", "types" ] + "exclude": [ "node_modules", "test", "types", "dist" ] } \ No newline at end of file