Skip to content

Commit 291409d

Browse files
committed
chore: use actions to push
1 parent a82669f commit 291409d

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,29 @@ jobs:
2727
node-version: ${{ github.event.inputs.nodeVersion }}
2828
registry-url: "https://registry.npmjs.org"
2929

30-
- name: Bump version and push tag
30+
- name: Bump node-vault version
3131
run: |
32-
git config --local user.email "action@github.com"
33-
git config --local user.name "GitHub Action"
3432
npm version ${{ github.event.inputs.semver }}
35-
git push && git push --tags
33+
34+
- name: Push changes
35+
uses: EndBug/add-and-commit@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081 # tag: v9.1.3
36+
with:
37+
default_author: github-actions
38+
add: "package.json package-lock.json"
39+
commit: --signoff
40+
message: "chore(release): bump version to ${{ github.event.inputs.semver }}"
3641

3742
- name: Publish
3843
run: npm publish
3944
env:
4045
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
4146

42-
- run: |
43-
echo VERSION=$(cat package.json | grep version | tr -d " " | cut -d":" -f2 | tr -d "\",") >> $GITHUB_ENV
44-
shell: bash
45-
name: Set version as env var
47+
- name: Set version as env var
48+
run: |
49+
echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
4650
4751
- uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e
4852
name: Release
49-
id: create_release
5053
env:
5154
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5255
with:

0 commit comments

Comments
 (0)