From 1da108a93d2e8012b9ba0e6abe3f47e64488b1f4 Mon Sep 17 00:00:00 2001 From: Andrey Ponomarenko Date: Fri, 25 Sep 2020 08:44:07 +0300 Subject: [PATCH] build: npm publish config --- .github/workflows/release.yaml | 18 ++++++++++++++++++ .releaserc.json | 2 +- package.json | 4 +++- yarn.lock | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..40c8e05 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,18 @@ +name: Release +on: + push: + branches: + - master + +jobs: +test-and-release: + name: release + runs-on: ubuntu-18.04 + steps: + - name: Install dependencies + run: yarn + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: yarn release diff --git a/.releaserc.json b/.releaserc.json index 30e3777..4c4e4a0 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -3,7 +3,7 @@ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/changelog", - "@semantic-release/git", + "@semantic-release/github", { "path": "@semantic-release/npm", "npmPublish": true diff --git a/package.json b/package.json index 74d967b..4080104 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "author": "Andrey Ponomarenko", "license": "MIT", "publishConfig": { - "access": "public" + "access": "public", + "branches": ["master"] }, "files": [ "dist/" @@ -27,6 +28,7 @@ "@semantic-release/changelog": "^5.0.1", "@semantic-release/commit-analyzer": "^8.0.1", "@semantic-release/git": "^9.0.0", + "@semantic-release/github": "^7.1.1", "@semantic-release/npm": "^7.0.6", "@semantic-release/release-notes-generator": "^9.0.1", "@types/fs-extra": "^9.0.1", diff --git a/yarn.lock b/yarn.lock index 067ac59..7b6d0b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -363,7 +363,7 @@ micromatch "^4.0.0" p-reduce "^2.0.0" -"@semantic-release/github@^7.0.0": +"@semantic-release/github@^7.0.0", "@semantic-release/github@^7.1.1": version "7.1.1" resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-7.1.1.tgz#e998aa9a9cd770838d9f27c64f060c2b686b9d95" integrity sha512-w8CLCvGVKNe2FPOYQ68OFxFVNNha7YRzptnwTZYdjXYtgTDKw0XVfnMSd9NlJeQPYGfQmIhIVPNBU/cA6zUY0A==