mermaid/.github/workflows/release.yml

47 lines
1.4 KiB
YAML
Raw Normal View History

2024-08-22 14:10:08 +05:30
name: Release
on:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
2024-08-24 09:26:49 +00:00
permissions: # added using https://github.com/step-security/secure-repo
contents: read
2024-08-22 14:10:08 +05:30
jobs:
release:
2024-09-02 20:44:29 +05:30
if: github.repository == 'mermaid-js/mermaid'
2024-08-24 09:26:49 +00:00
permissions:
2024-09-02 20:42:55 +05:30
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)
2024-08-22 14:10:08 +05:30
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
2024-08-24 09:26:49 +00:00
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
2024-08-22 14:10:08 +05:30
2024-08-24 09:26:49 +00:00
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
2024-08-22 14:10:08 +05:30
- name: Setup Node.js
2024-08-24 09:26:49 +00:00
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
2024-08-22 14:10:08 +05:30
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
2024-08-24 09:26:49 +00:00
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
2024-08-22 14:10:08 +05:30
with:
2024-08-22 15:21:48 +05:30
version: pnpm changeset:version
publish: pnpm changeset:publish
2024-08-22 14:10:08 +05:30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2024-08-24 15:34:53 +05:30
NPM_CONFIG_PROVENANCE: true