Skip to content

Commit

Permalink
feat: add --tag rc option if publishing RC
Browse files Browse the repository at this point in the history
  • Loading branch information
guidanoli committed Oct 3, 2023
1 parent b317250 commit 496535d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Check if tag is release candidate
id: tag_check
outputs:
is_rc: ${{ contains(env.GITHUB_REF_NAME, '-rc.') }}

- name: Publish package
if: steps.tag_check.outputs.is_rc != 'false'
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish release candidate
if: steps.tag_check.outputs.is_rc == 'true'
run: yarn publish --access public --tag rc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 496535d

Please sign in to comment.