Publish @storybooker/azure v0.1.0 #35
This file contains hidden or 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: Publish | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "main" | |
| permissions: | |
| contents: write | |
| id-token: write | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| publish-all: | |
| name: Publish all packages | |
| runs-on: ubuntu-latest | |
| env: | |
| NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Verify | |
| run: yarn verify | |
| - name: Check changesets | |
| id: check | |
| run: | | |
| count=$(find .changeset -name "*.md" | wc -l | tr -d '[:space:]') | |
| if [[ $count == 0 ]]; then | |
| echo "hasChangesets=false" >> $GITHUB_OUTPUT; | |
| else | |
| echo "hasChangesets=true" >> $GITHUB_OUTPUT; | |
| fi | |
| - name: Publish | |
| if: ${{ steps.check.outputs.hasChangesets == 'true' }} | |
| continue-on-error: true | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| yarn publish | |
| - name: Push changes | |
| if: ${{ steps.check.outputs.hasChangesets == 'true' }} | |
| run: | | |
| git status | |
| git push origin | |
| git push origin --tags |