From 1733db30730f1be708d9ce517232318933edc4c5 Mon Sep 17 00:00:00 2001 From: artem-zakharchenko Date: Thu, 9 Dec 2021 14:53:46 +0100 Subject: [PATCH] chore: add "semantic-release" to GitHub actions --- .github/workflows/ci.yml | 11 +++++++++++ package.json | 6 +----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b0cf56..839a460 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,3 +17,14 @@ jobs: - run: npm run lint - run: npm run build - run: npm test + + release: + runs-on: [ubuntu-latest] + needs: build + if: success() && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v2 + - name: Semantic release + run: npx semantic-release + env: + NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }} diff --git a/package.json b/package.json index 8ed94fc..e416c17 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,7 @@ "lint": "eslint lib/**/*.js test/**/*.js", "test": "npm run test:unit && npm run test:features", "test:unit": "mocha \"test/**/*.test.js\"", - "test:features": "node scripts/cucumber.js", - "ci:lint": "npm run lint", - "ci:test": "npm test", - "ci:build": "npm run build", - "ci:release": "semantic-release" + "test:features": "node scripts/cucumber.js" }, "husky": { "hooks": {