Skip to content

Commit ef3c03d

Browse files
committed
Fixing publish
1 parent 4478007 commit ef3c03d

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/autopublish.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,31 @@ on:
55
branches:
66
- master
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
build:
1013
runs-on: ubuntu-latest
1114

15+
env:
16+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
18+
1219
steps:
13-
- uses: actions/checkout@v1
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
1423

1524
- name: reattach HEAD
1625
run: |
1726
git checkout "${GITHUB_REF:11}"
1827
1928
- name: Use Node.js
20-
uses: actions/setup-node@v1
29+
uses: actions/setup-node@v4
2130
with:
22-
node-version: 10.x
31+
node-version: 18.x
32+
registry-url: https://registry.npmjs.org
2333

2434
- name: Install dependencies
2535
run: |
@@ -39,12 +49,13 @@ jobs:
3949
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
4050
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
4151

52+
- name: npm whoami (debug)
53+
run: npm whoami
54+
4255
- name: Publish new version if required
4356
run: |
44-
yarn lerna version --conventional-commits --allow-branch=master --no-changelog --sign-git-commit --sign-git-tag --yes
57+
yarn lerna version --conventional-commits --allow-branch=master --no-changelog --sign-git-commit --sign-git-tag --no-push --yes
4558
yarn release
46-
env:
47-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4859
4960
- name: Push changes
5061
run: |

scripts/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22

33
printf "//registry.npmjs.org/:_authToken="%s"\n@csssr:registry=https://registry.npmjs.org/\n" "$NPM_TOKEN" >> $HOME/.npmrc 2> /dev/null
4-
./node_modules/.bin/lerna publish from-git --yes --registry https://registry.npmjs.org/
4+
./node_modules/.bin/lerna publish from-git --yes --registry https://registry.npmjs.org/ --no-push

0 commit comments

Comments
 (0)