diff --git a/.github/workflows/deploy-typescript-npm.yml b/.github/workflows/deploy-typescript-npm.yml new file mode 100644 index 0000000..fcd5e10 --- /dev/null +++ b/.github/workflows/deploy-typescript-npm.yml @@ -0,0 +1,34 @@ +name: Deploy NPM Typescript + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + # specifically, when the 'eventsub_subscriptions.json' file has changed + push: + branches: [ "main" ] + paths: [ "eventsub_subscriptions.json" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + + # build the package + - uses: cgsdev0/tau-types-action@HEAD + with: + output-file: npm-types/index.d.ts + + # push to npm + - run: npm publish + working-directory: npm-types + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/npm-types/package.json b/npm-types/package.json new file mode 100644 index 0000000..0cff42d --- /dev/null +++ b/npm-types/package.json @@ -0,0 +1,25 @@ +{ + "name": "tau-types", + "version": "0.0.1", + "description": "Typescript definitions for TAU", + "main": "", + "repository": { + "type": "git", + "url": "git+https://github.com/Team-TAU/tau.git" + }, + "keywords": [ + "tau", + "twitch", + "typescript" + ], + "author": "cgsdev0", + "license": "MIT", + "bugs": { + "url": "https://github.com/Team-TAU/tau/issues" + }, + "homepage": "https://github.com/Team-TAU/tau#readme", + "devDependencies": { + "prettier": "^2.8.4", + "quicktype": "^23.0.11" + } +}