Skip to content

Commit d844284

Browse files
Update workflow to specify release version
1 parent 7cbbf8e commit d844284

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,20 @@ jobs:
2828
- name: Build package
2929
run: npm run build
3030

31+
- name: Extract version
32+
id: package-version
33+
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
34+
3135
- name: Publish to npm
3236
run: npm publish --access public
3337
env:
34-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
40+
- name: Create GitHub Release
41+
uses: softprops/action-gh-release@v1
42+
with:
43+
tag_name: v${{ steps.package-version.outputs.VERSION }}
44+
name: Release v${{ steps.package-version.outputs.VERSION }}
45+
generate_release_notes: true
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)