diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.yml index ba2bec3..73df1b3 100644 --- a/.github/workflows/publish-main.yml +++ b/.github/workflows/publish-main.yml @@ -1,8 +1,8 @@ -name: Publish (main) +name: Publish on: release: - types: [published] + types: [ published ] jobs: publish: @@ -28,4 +28,4 @@ jobs: - name: Publish to GPR env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - run: npm publish --tag latest --access public + run: npm publish --tag latest --access public \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ba4a0b5 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,21 @@ +name: Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: latest + registry-url: https://registry.npmjs.org/ + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm test \ No newline at end of file