Skip to content

Commit

Permalink
CI: modify build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Jul 13, 2023
1 parent 377f486 commit 43d5dec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Author: Kang Lin<[email protected]>

name: build

env:
Expand All @@ -7,6 +9,7 @@ env:

on:
push:
pull_request:

jobs:
ubuntu:
Expand All @@ -25,9 +28,9 @@ jobs:
uses: ./.github/workflows/android.yml

deploy:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: [ubuntu, msvc, macos, android]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -58,24 +61,25 @@ jobs:
name: ${{ needs.android.outputs.name }}
path: ${{ env.artifact_path }}

- name: Make note file
- name: Make Note.md file
run: |
cd ${{ env.artifact_path }}
echo "[:cn: 修改日志](https://github.com/KangLin/Calendar/blob/${{env.Calendar_VERSION}}/ChangeLog_zh_CN.md)" > ${{github.workspace}}/Release.md
echo "[:en: Change log](https://github.com/KangLin/Calendar/blob/${{env.Calendar_VERSION}}/ChangeLog.md)" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
echo "文件签名:" >> ${{github.workspace}}/Release.md
echo "[:cn: 修改日志](https://github.com/KangLin/Calendar/blob/${{env.Calendar_VERSION}}/ChangeLog_zh_CN.md)" > ${{github.workspace}}/Note.md
echo "[:us: Change log](https://github.com/KangLin/Calendar/blob/${{env.Calendar_VERSION}}/ChangeLog.md)" >> ${{github.workspace}}/Note.md
echo "" >> ${{github.workspace}}/Note.md
echo "文件签名:" >> ${{github.workspace}}/Note.md
for file in *
do
echo $file
if [ -f $file ]; then
#echo $file
if [ -f $file ] && [ "${file##*.}" != "xml" ]; then
#echo "md5sum $file"
md5sum $file > $file.md5sum
cat $file.md5sum >> ${{github.workspace}}/Release.md
cat $file.md5sum >> ${{github.workspace}}/Note.md
fi
done
- name: Upload To Github Release
#if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Release.md
gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/*
gh release upload ${{ github.ref_name }} ${{github.workspace}}/Release.md
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Note.md
gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md
2 changes: 1 addition & 1 deletion 3th_libs/LunarCalendar

0 comments on commit 43d5dec

Please sign in to comment.