Skip to content

Commit cbc9bd2

Browse files
committed
🐛(CD): Fix workflow
1 parent 4985c85 commit cbc9bd2

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

.github/workflows/CD.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,22 @@ jobs:
1717
git config --global user.name "JeremyDolle"
1818
git config --global user.email "[email protected]"
1919
npm version ${{ github.event.release.tag_name }}
20-
- run: yarn ci --omit=dev --ignore-scripts
20+
- name: Install dependencies
21+
run: |
22+
if [ -e yarn.lock ]; then
23+
yarn install --frozen-lockfile
24+
elif [ -e package-lock.json ]; then
25+
npm ci
26+
else
27+
npm i
28+
fi
2129
- uses: JS-DevTools/npm-publish@v1
2230
with:
2331
token: ${{ secrets.NPM_TOKEN }}
24-
- run: git commit -am "🏷️(version) Update boilerplate to version ${{ github.event.release.tag_name }}"
25-
- run: git push
32+
- name: Commit and push
33+
run: |
34+
git commit -am "🏷️(version) Update boilerplate to version ${{ github.event.release.tag_name }}"
35+
git push
2636
env:
2737
github-token: ${{ secrets.GITHUB_TOKEN }}
2838
publish-candidate:
@@ -37,12 +47,22 @@ jobs:
3747
git config --global user.name "JeremyDolle"
3848
git config --global user.email "[email protected]"
3949
npm version ${{ github.event.release.tag_name }}
40-
- run: yarn ci --omit=dev --ignore-scripts
50+
- name: Install dependencies
51+
run: |
52+
if [ -e yarn.lock ]; then
53+
yarn install --frozen-lockfile
54+
elif [ -e package-lock.json ]; then
55+
npm ci
56+
else
57+
npm i
58+
fi
4159
- uses: JS-DevTools/npm-publish@v1
4260
with:
4361
token: ${{ secrets.NPM_TOKEN }}
4462
tag: ${{ github.event.release.tag_name }}
45-
- run: git commit -am "🏷️(version) Update boilerplate to rc version ${{ github.event.release.tag_name }}"
46-
- run: git push
63+
- name: Commit and push
64+
run: |
65+
git commit -am "🏷️(version) Update boilerplate to rc version ${{ github.event.release.tag_name }}"
66+
git push
4767
env:
4868
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)