diff --git a/.github/workflows/deploy_library.yml b/.github/workflows/test-and-deplyo.yml similarity index 86% rename from .github/workflows/deploy_library.yml rename to .github/workflows/test-and-deplyo.yml index a9fc0b3..1630f34 100644 --- a/.github/workflows/deploy_library.yml +++ b/.github/workflows/test-and-deplyo.yml @@ -1,10 +1,7 @@ -name: gocardless/gocardless-nodejs/deploy_library -on: - push: - branches: - - master +on: push + jobs: - test_library: + test: runs-on: ubuntu-latest container: image: node:lts @@ -12,12 +9,13 @@ jobs: - uses: actions/checkout@v3.3.0 - run: npm install --save-dev jest typescript ts-jest @types/jest - run: npm test - transpile_library: + + transpile: runs-on: ubuntu-latest container: image: node:lts needs: - - test_library + - test steps: - uses: actions/checkout@v3.3.0 - run: npm install @@ -26,13 +24,14 @@ jobs: - uses: actions/upload-artifact@v3.1.1 with: path: "dist" + publish_to_npm: if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest container: image: node:lts needs: - - transpile_library + - transpile env: DIST_FOLDER: "/dist/artifact" steps: