From 3a363fd7bce29ffd615b217badad53ae98193f79 Mon Sep 17 00:00:00 2001 From: Damian Osipiuk Date: Wed, 28 Jul 2021 22:49:58 +0200 Subject: [PATCH] build: semantic-release config --- .github/workflows/ci.yml | 5 +++-- .releaserc.json | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .releaserc.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48a1c3e..78b97c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - beta pull_request: jobs: @@ -44,7 +45,7 @@ jobs: publish: # publish only when merged in master on original repo, not on PR - if: github.repository == 'DamianOsipiuk/vue-query' && github.ref == 'refs/heads/main' + if: github.repository == 'DamianOsipiuk/vue-query' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') needs: [verify, commitlint] runs-on: ubuntu-latest @@ -57,7 +58,7 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run build - - run: npx semantic-release@17 --branches main + - run: npx semantic-release@17 env: NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..c5d0d0e --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,7 @@ +{ + "branches": [ + "main", + { "name": "beta", "prerelease": true }, + { "name": "alpha", "prerelease": true } + ] +}