Skip to content

Commit 861b023

Browse files
committed
chore: commit updated package.json in the node-release workflow
1 parent a0c7866 commit 861b023

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

.github/workflows/node-release.yaml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
needs: [test]
3535
steps:
3636
- uses: actions/checkout@v4
37+
with:
38+
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
3739

3840
- name: Setup node
3941
uses: actions/setup-node@v4
@@ -66,20 +68,19 @@ jobs:
6668
run: |
6769
yarn version --new-version ${{ steps.get-new-version.outputs.TARGET_VERSION }}
6870
69-
- name: Publish
71+
- name: Publish to npm
7072
run: |
7173
npm config set provenance true
72-
if git log -1 --pretty=%B | grep "^v[0-9]\+\.[0-9]\+\.[0-9]\+$";
73-
then
74-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
75-
npm publish --access public
76-
elif git log -1 --pretty=%B | grep "^v[0-9]\+\.[0-9]\+\.[0-9]\+";
77-
then
78-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
79-
npm publish --tag next --access public
80-
else
81-
echo "Not a release, skipping publish"
82-
fi
74+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
75+
npm publish --access public
8376
env:
84-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85-
NPM_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_NPM_TOKEN }}
77+
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
78+
NPM_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_NPM_TOKEN }}
79+
80+
- name: Commit changes
81+
id: commit
82+
uses: EndBug/add-and-commit@v9
83+
with:
84+
author_name: Apify Release Bot
85+
author_email: [email protected]
86+
message: "chore(js-release): Update package version [skip ci]"

0 commit comments

Comments
 (0)