Merge pull request #6016 from mermaid-js/update-blog #46
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: Release | |
on: | |
push: | |
branches: | |
- master | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: # added using https://github.com/step-security/secure-repo | |
contents: read | |
jobs: | |
release: | |
if: github.repository == 'mermaid-js/mermaid' | |
permissions: | |
contents: write # to create release (changesets/action) | |
id-token: write # OpenID Connect token needed for provenance | |
pull-requests: write # to create pull request (changesets/action) | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
- name: Setup Node.js | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
cache: pnpm | |
node-version-file: '.node-version' | |
- name: Install Packages | |
run: pnpm install --frozen-lockfile | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@3de3850952bec538fde60aac71731376e57b9b57 # v1.4.8 | |
with: | |
version: pnpm changeset:version | |
publish: pnpm changeset:publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_CONFIG_PROVENANCE: true |