Run publish @po-ui/style #145
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run publish @po-ui/style | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '14.x' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm install | |
- run: npm run build | |
- name: Get package.json version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
- name: Run publish with -next | |
run: npm publish dist/style --tag next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Add "latest" tag | |
if: (!contains(steps.package-version.outputs.current-version, '-next') && !contains(steps.package-version.outputs.current-version, '-rc')) | |
run: npm dist-tags add @po-ui/style@${{ steps.package-version.outputs.current-version}} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |