From 19f53a66c687ec8ca37ee0f70dbea1d3d32b4c61 Mon Sep 17 00:00:00 2001 From: Artem Derevnjuk Date: Mon, 2 Oct 2023 18:02:00 +0400 Subject: [PATCH] ci: enable alpha distribution channel (#461) --- .github/workflows/deploy.yml | 13 ++++++++++++- .github/workflows/release.yml | 1 + .releaserc | 7 ++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bd99ee68..d09209d8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,6 @@ on: env: VERSION: ${{ github.event.release.tag_name }} TARGET_REF: ${{ github.event.release.target_commitish }} - TAG: ${{ github.event.release.target_commitish == 'master' && 'latest' || 'next' }} jobs: install-deps: @@ -163,6 +162,18 @@ jobs: - name: Setup node uses: ./.github/workflows/composite/npm + - name: Set TAG based on target_commitish + run: | + if [ "${{ github.event.release.target_commitish }}" == "next" ]; then + echo "TAG=next" >> $GITHUB_ENV + elif [ "${{ github.event.release.target_commitish }}" == "alpha" ]; then + echo "TAG=alpha" >> $GITHUB_ENV + elif [ "${{ github.event.release.target_commitish }}" == "master" ]; then + echo "TAG=latest" >> $GITHUB_ENV + else + exit 1 + fi + - run: npm publish --tag $TAG env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94acf1db..55dfe98b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,7 @@ on: branches: - master - next + - alpha jobs: release: diff --git a/.releaserc b/.releaserc index 76159d49..3e1f968e 100644 --- a/.releaserc +++ b/.releaserc @@ -57,7 +57,12 @@ { "name": "next", "channel": "next", - "prerelease": "next" + "prerelease": true + }, + { + "name": "alpha", + "channel": "alpha", + "prerelease": true } ], "ci": true