diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml new file mode 100644 index 0000000..88966d8 --- /dev/null +++ b/.github/workflows/publish-to-npm.yml @@ -0,0 +1,25 @@ +name: Publish to NPM + +on: + push: + tags: + - v* + workflow_dispatch: + +jobs: + publish-to-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + cache: npm + node-version: 'lts/*' + registry-url: 'https://registry.npmjs.org' + - name: Install Dependencies + run: npm ci + - name: Publish + run: npm publish + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f13bb03 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Test + +on: + pull_request: + branches: + - develop + push: + branches: + - develop + tags: + - v* + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + cache: npm + - name: Install Dependencies + run: npm ci + - name: Test + run: npm test + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results + path: ${{ github.workspace }}/test-report