-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.18 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
on:
push:
branches:
- main
paths:
- package.json
jobs:
release:
runs-on: ubuntu-latest
permissions: write-all
steps:
# Checkout the repository
- uses: actions/checkout@v4
# Create a new version tag
- uses: Klemensas/action-autotag@stable
id: tag
with:
tag_prefix: v
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create the changelog
- uses: heinrichreimer/[email protected]
id: changelog
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Extract the release notes
- uses: actions-ecosystem/action-regex-match@v2
id: releasenotes
with:
text: ${{ steps.changelog.outputs.changelog }}
regex: ^(\n|.)*?(##(.+)\n\n((\n|.)*?))(\n)+(##(\n|.)*)?(\n)+\\\*(.+)$
# Create a new GitHub release
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag.outputs.tagname }}
body: ${{ steps.releasenotes.outputs.group4 }}
# Publish a new NPM version
- uses: JS-DevTools/npm-publish@v3
with:
access: public
token: ${{ secrets.NPM_TOKEN }}