From f4b1ec1d9f695e48979cb891b8fd570779362580 Mon Sep 17 00:00:00 2001 From: Leonard Techel Date: Wed, 30 Jun 2021 13:07:25 +0200 Subject: [PATCH] feat: add semantic-release github action --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ .releaserc.json | 22 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .releaserc.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9bf5908 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +on: + push: + branches: + - "+([0-9])?(.{+([0-9]),x}).x" + - main + - next + - next-major + - beta + - alpha + - feature/semantic-release + pull_request: + branches: [main] + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Install dependencies + run: npm install -g semantic-release@~17.4.4 @semantic-release/git@~9.0.0 + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: semantic-release --dry-run diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..dc1f4de --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,22 @@ +{ + "branches": [ + "+([0-9])?(.{+([0-9]),x}).x", + "main", + "next", + "next-major", + { "name": "beta", "prerelease": true }, + { "name": "alpha", "prerelease": true } + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/npm", + { + "pkgRoot": "app" + } + ], + "@semantic-release/github", + "@semantic-release/git" + ] +}