Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
Expand All @@ -24,6 +25,8 @@ jobs:
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org
package-manager-cache: false

- name: Install Dependencies
if: ${{ steps.publish.outputs.release_created }}
Expand All @@ -33,9 +36,10 @@ jobs:
if: ${{ steps.publish.outputs.release_created }}
run: npm run build

- name: Run Tests
if: ${{ steps.publish.outputs.release_created }}
run: npm test

- name: Publish to NPM
if: ${{ steps.publish.outputs.release_created }}
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc && npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

run: npm publish
3 changes: 3 additions & 0 deletions bin/ott.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /usr/bin/env node

require('../dist/main.js');
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
],
"main": "./dist/main.js",
"bin": {
"ott": "./dist/main.js"
"ott": "bin/ott.js"
},
"files": [
"bin",
"dist",
"CHANGELOG.md"
],
"repository": {
"type": "git",
"url": "https://github.com/pablaber/openapi-typescript-types/"
"url": "git+https://github.com/pablaber/openapi-typescript-types.git"
},
"scripts": {
"build": "tsc",
Expand Down Expand Up @@ -53,4 +54,4 @@
"minimatch": "^9.0.4",
"winston": "^3.13.0"
}
}
}