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