diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..dc621bb --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,52 @@ +name: Node.js Package + +on: + pull_request: + branches: + - master + push: + branches: + - master + - refs/tags/* + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 10 + - run: yarn install --frozen-lockfile + - run: yarn test + + publish-npm: + if: startsWith(github.ref, 'refs/tags') + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 10 + registry-url: https://registry.npmjs.org/ + - run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + publish-gpr: + if: startsWith(github.ref, 'refs/tags') + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 10 + registry-url: https://npm.pkg.github.com/ + scope: '@hmcts' + - run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2798ace..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: -- '8' -cache: yarn -script: -- yarn --version -- yarn check --integrity -- yarn test \ No newline at end of file diff --git a/package.json b/package.json index 4e72bdb..9ff75f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hmcts/div-test-harness", - "version": "1.0.2", + "version": "1.0.3", "description": "Module used for functional tests to create a case and progress it to a certain state so that other tests can build upon it", "main": "index.js", "scripts": {