correção na barra do upload e quando e multiplo #123
Workflow file for this run
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: publish | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- develop | |
- master | |
jobs: | |
lerna: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v4 | |
name: setup pnpm | |
with: | |
version: 9.11.0 | |
run_install: false | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: install and prepare | |
run: pnpm i | |
- name: setup npm | |
run: | | |
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" | |
- name: version and publish | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
if [ ${{ github.base_ref }} = master ]; then | |
npx --yes lerna version --no-private --ignore-scripts --exact --conventional-commits --conventional-graduate --create-release github --sync-workspace-lock --yes | |
npx --yes lerna publish from-git --ignore-scripts --yes | |
else | |
npx --yes lerna version --no-private --ignore-scripts --exact --conventional-commits --conventional-prerelease --preid beta --create-release github --sync-workspace-lock --yes | |
npx --yes lerna publish from-git --ignore-scripts --dist-tag beta --yes | |
fi | |
docs: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v4 | |
name: setup pnpm | |
with: | |
version: 9.11.0 | |
run_install: false | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: install deps | |
run: pnpm i | |
- name: build docs | |
run: pnpm build:storybook | |
- name: upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './sbdocs' | |
deploy: | |
needs: docs | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: deploy pages | |
uses: actions/deploy-pages@v4 |