diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0e54749 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - run: npm install + - run: npm run jslint + - run: npm test + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_REGION: ${{ secrets.AWS_REGION }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + GCP_JSON_KEY: ${{ secrets.GCP_JSON_KEY }} + IBM_API_KEY: ${{ secrets.IBM_API_KEY }} + IBM_TTS_API_KEY: ${{ secrets.IBM_TTS_API_KEY }} + IBM_TTS_REGION: ${{ secrets.IBM_TTS_REGION }} + MICROSOFT_API_KEY: ${{ secrets.MICROSOFT_API_KEY }} + MICROSOFT_REGION: ${{ secrets.MICROSOFT_REGION }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..81153cc --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +name: npm-publish + +# run when a tag is pushed or kick off manually +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}