diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e3e21830df32e8..4e2a4eb3e6e40f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,9 @@ name: Publish packages on: + push: + branches: + - master workflow_dispatch: inputs: sha: @@ -26,7 +29,30 @@ on: permissions: {} jobs: + publish-internal: + name: Publish internal packages + if: (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.event.head_commit.author.name != 'renovate[bot]')) + runs-on: ubuntu-latest + permissions: + contents: write # Required for pushing tags and creating releases + id-token: write # Required for provenance + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ github.event_name == 'push' && github.sha || inputs.sha }} + fetch-depth: 0 # Fetch full history for proper git operations + - name: Prepare for publishing + uses: mui/mui-public/.github/actions/publish-prepare@48198a7131b2ee621cc13bc7729cc41c72f370e7 + - name: Publish packages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pnpm code-infra publish-canary --package @mui/internal-markdown @mui/docs @mui/internal-scripts @mui-internal/api-docs-builder @mui/internal-docs-utils + publish: + if: github.event_name == 'workflow_dispatch' + name: Publish packages to npm runs-on: ubuntu-latest permissions: contents: write # Required for pushing tags and creating releases diff --git a/packages/markdown/.npmignore b/packages/markdown/.npmignore new file mode 100644 index 00000000000000..1af71721cb1c9b --- /dev/null +++ b/packages/markdown/.npmignore @@ -0,0 +1,2 @@ +*.test.* +vitest.config.*