We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71765d0 commit 96537c3Copy full SHA for 96537c3
.github/workflows/release.yml
@@ -11,6 +11,16 @@ jobs:
11
runs-on: ubuntu-latest
12
steps:
13
- uses: actions/checkout@v2
14
+ - name: Prevent releasing if the repo is generated from the template and pkg.name not changed
15
+ run: |
16
+ repo="$GITHUB_REPOSITORY"
17
+ pkg=$(node -p 'require("./package.json").name')
18
+ if [ "$pkg" == "@tlib/package-template" && "$repo" != 'tlibjs/package-template' ]; then
19
+ echo 'Please modify "name" field in package.json' >&2
20
+ exit 1
21
+ else
22
+ echo "Start releasing package $pkg in repo $repo"
23
+ fi
24
- name: Use Node.js
25
uses: actions/setup-node@v1
26
with:
0 commit comments