8000 feat(mix): add changelog · askides/react-plock@ecfe6ab · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit ecfe6ab

Browse files
committed
feat(mix): add changelog
1 parent 186ce52 commit ecfe6ab

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,33 @@ jobs:
3939
- name: Copy README
4040
run: cp README.md libs/react-plock/dist/
4141

42-
- name: Manual Release
42+
# - name: Manual Release
43+
# env:
44+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
# VERSION: ${{ inputs.version }}
47+
# run: |
48+
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
49+
# git config --global user.name "github-actions[bot]"
50+
# npm version $VERSION
51+
# pnpm --filter react-plock publish
52+
53+
- name: Generate Changelog
54+
id: changelog
55+
run: |
56+
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^)
57+
CHANGELOG=$(git log --pretty=format:"- %s" ${PREVIOUS_TAG}..HEAD)
58+
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
59+
echo "$CHANGELOG" >> $GITHUB_ENV
60+
echo "EOF" >> $GITHUB_ENV
61+
62+
- name: Create GitHub Release
63+
uses: actions/create-release@v1
4364
env:
4465
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46-
VERSION: ${{ inputs.version }}
47-
run: |
48-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
49-
git config --global user.name "github-actions[bot]"
50-
npm version $VERSION
51-
pnpm --filter react-plock publish
66+
with:
67+
tag_name: v${{ inputs.version }}
68+
release_name: v${{ inputs.version }}
69+
body: ${{ env.CHANGELOG }}
70+
draft: false
71+
prerelease: false

0 commit comments

Comments
 (0)
0