🔖 Update CHANGELOG.md for @fast-check/[email protected], @fast-check/[email protected], [email protected], @fast-check/[email protected] #83
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: Safe Release | |
on: | |
pull_request: | |
branches: | |
- main | |
- 'next-*_*_*' | |
- 'fix-v*' | |
paths: | |
- '**/CHANGELOG.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
safe_release: | |
name: 'Safe release' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: Check no package from workspace | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
script: | | |
const { promises: { readFile } } = require('fs'); | |
const globber = await glob.create('**/package.json'); | |
const files = await globber.glob(); | |
for (const file of files) { | |
const fileContentRaw = await readFile(file); | |
const fileContent = JSON.parse(fileContentRaw.toString()); | |
if (fileContent.private) { | |
continue; | |
} | |
for (const depVersion of Object.values(fileContent.dependencies || {})) { | |
if (depVersion.startsWith('workspace:')) { | |
throw new Error(`Dependencies cannot start by workspace at release time, got: ${depVersion} in ${file}`); | |
} | |
} | |
for (const depVersion of Object.values(fileContent.peerDependencies || {})) { | |
if (depVersion.startsWith('workspace:')) { | |
throw new Error(`Peer-Dependencies cannot start by workspace at release time, got: ${depVersion} in ${file}`); | |
} | |
} | |
} |