diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e44fa19 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +name: Semantic Release + +on: + push: + branches: [ master ] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: '12.x' + - run: | + npm ci + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..0ec0fae --- /dev/null +++ b/.releaserc @@ -0,0 +1,15 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + ["@semantic-release/changelog", { + "changelogFile": "CHANGELOG.md" + }], + "@semantic-release/npm", + "@semantic-release/github", + ["@semantic-release/git", { + "assets": ["package.json", "package-lock.json", "LICENSE", "README.md", "CHANGELOG.md"], + "message": "chore: release ${nextRelease.version} :tada: [skip ci]\n\n${nextRelease.notes}" + }] + ] +} \ No newline at end of file