-
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 1.33 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
47
48
49
50
51
52
53
54
55
56
name: Release
# on:
# push:
# branches:
# - main
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm install
- name: Tag Creation
id: semantic_release
run: |
output=$(npx semantic-release 2>&1)
echo "$output"
tag=$(echo "$output" | grep 'Created tag' | sed -E 's/.*Created tag ([^ ]+).*/\1/')
echo "::set-output name=tag::$tag"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
id: git-cliff
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGELOG.md
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.semantic_release.outputs.tag }}
name: ${{ steps.semantic_release.outputs.tag }}
body: ${{ steps.git-cliff.outputs.content }}
token: ${{ secrets.GITHUB_TOKEN }}