File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ workflow_dispatch :
5+ permissions : write-all
6+
7+ jobs :
8+
9+ publish-npm :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : actions/setup-node@v4
14+ with :
15+ node-version : 18
16+ cache : ' npm'
17+ - run : echo "NPM_PACKAGE_VERSION=$(npm version patch --no-git-tag-version)" | tee -a $GITHUB_ENV
18+ - run : git add package.json package-lock.json
19+ - name : Update README.md with new version
20+ run : |
21+ sed -i "s|\(uses: forproxyband/vector-code-map@\)v[0-9.]*|\1${{ NPM_PACKAGE_VERSION }}|g" README.md
22+ - run : git add README.md
23+ - run : |
24+ git tag -a ${NPM_PACKAGE_VERSION} -m "Add tag ${NPM_PACKAGE_VERSION}"
25+ git push origin ${NPM_PACKAGE_VERSION}
26+ git commit -m "Set version ${NPM_PACKAGE_VERSION} by ${GITHUB_ACTOR}"
27+ git push -u origin main
28+ env:
29+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments