Skip to content

Commit ea8f45d

Browse files
committed
💚 优化 release 不带版本号
1 parent a6f027f commit ea8f45d

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

.github/workflows/flutter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222

2323
# Setup Java environment in order to build the Android app.
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
- uses: actions/setup-java@v3
2626
with:
2727
distribution: 'temurin'

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
- name: Publish
1616
uses: sakebook/[email protected]
1717
with:

.github/workflows/publish_apk.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
name: Publish APK
22

33
on:
4-
# push:
5-
# branches:
4+
push:
5+
branches:
66
# - develop
77
# - master
8-
# - 2x
9-
release:
10-
types: [published]
8+
- 2x
9+
# release:
10+
# types: [published]
1111

1212
jobs:
1313
publish:
1414
runs-on: ubuntu-latest
1515

1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
- name: Setup Java
2020
uses: actions/setup-java@v3
2121
with:

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Create GitHub Release
1+
name: Release
22

33
on:
44
push:
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout repository
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Extract version from tag
1616
id: extract_version
@@ -22,7 +22,7 @@ jobs:
2222
id: release_notes
2323
run: |
2424
VERSION=${{ env.VERSION }}
25-
CHANGELOG=$(sed -n "/## $VERSION/,/^## /p" CHANGELOG.md | sed '$d')
25+
CHANGELOG=$(sed -n "/## $VERSION/,/^## /p" CHANGELOG.md | sed '$d' | tail -n +2)
2626
if [ -z "$CHANGELOG" ]; then
2727
echo "Release notes not found for version $VERSION"
2828
exit 1
@@ -32,7 +32,7 @@ jobs:
3232
echo "EOF" >> $GITHUB_ENV
3333
3434
- name: Create GitHub release
35-
uses: softprops/action-gh-release@v1
35+
uses: softprops/action-gh-release@v2
3636
with:
3737
body: ${{ env.RELEASE_NOTES }}
3838
env:

releaselog.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cat CHANGELOG.md
1616
echo "=== End of CHANGELOG.md content ==="
1717

1818
# 从 CHANGELOG.md 中提取对应版本的变更日志
19-
CHANGELOG=$(sed -n "/## $VERSION/,/^## /p" CHANGELOG.md | sed '$d')
19+
CHANGELOG=$(sed -n "/## $VERSION/,/^## /p" CHANGELOG.md | sed '$d' | tail -n +2)
2020

2121
if [ -z "$CHANGELOG" ]; then
2222
echo "Version $VERSION not found in CHANGELOG.md"

0 commit comments

Comments
 (0)