Skip to content

Commit

Permalink
ci: add automation for npm tags
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Mar 2, 2023
1 parent be3c5a6 commit 9b121f7
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,31 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish package
- name: Check for NEXT tag
id: next
uses: actions-ecosystem/action-regex-match@v2
with:
text: ${{ steps.version.outputs.tag }}
regex: '-next'

- name: Check for RC tag
id: rc
uses: actions-ecosystem/action-regex-match@v2
with:
text: ${{ steps.version.outputs.tag }}
regex: '-rc'

- name: Publish @effector/reflect@${{ steps.version.outputs.tag }} with NEXT tag
if: ${{ steps.next.outputs.match != '' }}
working-directory: './dist/'
run: npm publish --tag next

- name: Publish @effector/reflect@${{ steps.version.outputs.tag }} with RC tag
if: ${{ steps.rc.outputs.match != '' }}
working-directory: './dist/'
run: npm publish --tag rc

- name: Publish @effector/reflect@${{ steps.version.outputs.tag }} to latest
if: ${{ steps.next.outputs.match == '' }}
working-directory: './dist/'
run: npm publish
working-directory: ./temp

0 comments on commit 9b121f7

Please sign in to comment.