From 39b4304c2beeb95f427a1235ace9bdf903b5fa7e Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Wed, 1 Mar 2023 08:53:17 -0500 Subject: [PATCH] add github actions --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ .github/workflows/publish.yml | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/publish.yml 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 }}