Release v1.0.22 #538
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Kang Lin<kl222@126.com> | |
| name: build | |
| env: | |
| artifact_path: artifact_path | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| Calendar_VERSION: v1.0.22 | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| ubuntu: | |
| uses: ./.github/workflows/ubuntu.yml | |
| appimage: | |
| uses: ./.github/workflows/appimage.yml | |
| secrets: inherit | |
| msvc: | |
| uses: ./.github/workflows/msvc.yml | |
| mingw: | |
| uses: ./.github/workflows/mingw.yml | |
| macos: | |
| uses: ./.github/workflows/macos.yml | |
| android: | |
| uses: ./.github/workflows/android.yml | |
| secrets: inherit | |
| deploy: | |
| #if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-latest | |
| needs: [ubuntu, appimage, msvc, macos, android] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: false | |
| - name: Download ubuntu | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.ubuntu.outputs.name }} | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download appimage | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.appimage.outputs.name }} | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download msvc | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.msvc.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download macos | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.macos.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download android | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.android.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Process configure file | |
| run: | | |
| git clone https://github.com/KangLin/RabbitCommon.git | |
| ./RabbitCommon/Install/MergeJsonFile.sh \ | |
| "${{ github.workspace }}/update.json" \ | |
| "${{ env.artifact_path }}" "${{ env.artifact_path }}/version.json" | |
| rm ${{ env.artifact_path }}/*.json | |
| - name: Make note file | |
| run: | | |
| 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 "File checksum:" >> ${{github.workspace}}/Note.md | |
| echo "|File|Checksum(md5)|" >> ${{github.workspace}}/Note.md | |
| echo "| :- | :- |" >> ${{github.workspace}}/Note.md | |
| cd ${{ env.artifact_path }} | |
| for file in * | |
| do | |
| echo "$file" | |
| if [ -f $file ]; then | |
| if [ "${file##*.}" != "xml" ] && [ "${file##*.}" != "json" ]; then | |
| md5sum $file > ${file}.md5sum | |
| awk '{print "|", $2, "|", $1, "|"}' ${file}.md5sum >> ${{github.workspace}}/Note.md | |
| fi | |
| else | |
| rm -fr $file | |
| fi | |
| done | |
| - name: Upload To Github Release | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| #continue-on-error: true | |
| run: | | |
| 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 ${{github.workspace}}/update.json |