Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Commit 3a11a5c

Browse files
committed
Update npm-publish.yml
1 parent bebaef3 commit 3a11a5c

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/npm-publish.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,30 @@ jobs:
7474
dist-directory: ./dist/lakto/horo/
7575
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
7676
steps:
77-
- uses: actions/checkout@v2
78-
- uses: actions/setup-node@v1
77+
- name: Checkout
78+
uses: actions/checkout@v2
79+
- name: Set node
80+
uses: actions/setup-node@v1
7981
with:
8082
node-version: 12
8183
registry-url: https://registry.npmjs.org/
84+
- name: Update CHANGELOG file using gren
85+
uses: lakto/gren-changelog-action@v0.0.1
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
88+
with:
89+
options: '--override'
90+
- name: Upload CHANGELOG to release
91+
uses: svenstaro/upload-release-action@v2
92+
with:
93+
repo_token: ${{ secrets.GH_TOKEN }}
94+
file: CHANGELOG.md
95+
tag: ${{ github.ref }}
96+
overwrite: true
8297
- run: npm install
8398
- run: npm run build-lib
84-
- run: cd ${{env.dist-directory}} && npm version --from-git --git-tag-version=false --commit-hooks=false
99+
- name: Update version
100+
run: cp CHANGELOG.md ${{env.dist-directory}}/ && cd ${{env.dist-directory}} && npm version ${{github.ref}} --git-tag-version=false --commit-hooks=false
85101
- if: "github.event.release.prerelease"
86102
run: npm publish ${{env.dist-directory}} --tag rc --access public --dry-run
87103
env:

0 commit comments

Comments
 (0)