Skip to content

Commit a96fbd6

Browse files
committed
fix: auto publish
1 parent 5bd0651 commit a96fbd6

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

.github/workflows/npm-publish.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
name: Publish npm Package
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
- main
10+
11+
jobs:
12+
publish-npm:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: 20
19+
registry-url: https://registry.npmjs.org/
20+
- run: git config --global user.name "GitHub CD bot"
21+
- run: git config --global user.email "github-cd-bot@example.com"
22+
- run: npx semantic-release
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
# push the version changes to GitHub
27+
- run: git add package.json && git commit -m'update version' && git push
28+
env:
29+
# The secret is passed automatically. Nothing to configure.
30+
github-token: ${{ secrets.GITHUB_TOKEN }}

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/codecept-js/create-codeceptjs.git"
13+
"url": "git+https://github.com/codeceptjs/create-codeceptjs.git"
1414
},
1515
"keywords": [
1616
"codeceptjs",
@@ -21,9 +21,9 @@
2121
"author": "Michael Bodnarchuk",
2222
"license": "ISC",
2323
"bugs": {
24-
"url": "https://github.com/codecept-js/create-codeceptjs/issues"
24+
"url": "https://github.com/codeceptjs/create-codeceptjs/issues"
2525
},
26-
"homepage": "https://github.com/codecept-js/create-codeceptjs#readme",
26+
"homepage": "https://github.com/codeceptjs/create-codeceptjs#readme",
2727
"dependencies": {
2828
"cfonts": "2.8.5",
2929
"chalk": "4.1.0",

0 commit comments

Comments
 (0)