-
Notifications
You must be signed in to change notification settings - Fork 13
43 lines (35 loc) · 1.17 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
# https://github.com/sveltejs/kit/blob/32afba695088b946aefe96da75b36de9b0667fbe/.github/workflows/release.yml
name: 'Release'
on:
push:
branches: ['ximo_dev']
jobs:
# 新增的 release-notes Job
release-notes:
name: Generate Release Notes
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up git
run: |
git fetch --prune --unshallow
git fetch --tags
- name: Get latest tag
id: get_tag
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Install dependencies
run: npm install
- name: Generate GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG }} # 使用最近的 tag 作为 tag 名
release_name: Release ${{ env.TAG }} # 使用最近的 tag 作为 release 名
body: |
## Changes
$(npx changeset status --snapshot) # 使用 changeset 文案生成 Release Notes
draft: false # 直接发布而非草稿