Skip to content

Commit 7d034ba

Browse files
author
2603003199a
authored
Merge pull request #6 from Hanprogramer/main
Fix: Build release workflow
2 parents cbf71ce + bd0960a commit 7d034ba

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/build-release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16+
- name: Create short commit SHA
17+
id: create_short_sha
18+
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.event.pull_request.head.sha }})"
19+
1620
- name: release
1721
uses: actions/create-release@v1
1822
id: create_release
1923
with:
20-
release_name: ${{ github.event.title }} #pull request title
21-
tag_name: ${{ github.ref }}
24+
release_name: ${{ github.event.pull_request.title }} #pull request title
25+
body: ${{ github.event.pull_request.body }}
26+
tag_name: ${{ steps.create_short_sha.outputs.sha_short }}
2227
env:
2328
GITHUB_TOKEN: ${{ github.token }}
29+
2430

2531
build-android:
2632
name: Build android and upload
@@ -47,7 +53,7 @@ jobs:
4753
with:
4854
upload_url: ${{ needs.jobs.create-release.outputs.upload_url }}
4955
asset_path: ${{ env.GITHUB_WORKSPACE }}/build/app/outputs/flutter-apk/app-release.apk
50-
asset_name: corecoder_develop_${{ github.ref }}.apk
56+
asset_name: corecoder_develop_${{ needs.jobs.create-release.outputs.sha_short }}.apk
5157
asset_content_type: application/gzip
5258
build-windows:
5359
name: Build windows and upload

0 commit comments

Comments
 (0)