Skip to content

Commit

Permalink
add workflow to build and deploy typescript declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsdev0 committed Mar 4, 2023
1 parent e57db0f commit 4b160b0
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy-typescript-npm.yml
Original file line number Diff line number Diff line change
@@ -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 }}
25 changes: 25 additions & 0 deletions npm-types/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit 4b160b0

Please sign in to comment.