Skip to content

Commit

Permalink
CI: modify ci
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Feb 5, 2024
1 parent 7a00909 commit 5c6dadc
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 32 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ jobs:
android ${{matrix.config_arch}} \
"https://github.com/KangLin/Calendar/releases/download/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk,https://sourceforge.net/projects/rabbitcalendar/files/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk"
- name: Update xml file
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_arch == 'android_armv7' }}
working-directory: ${{github.workspace}}/build
run: |
cp ${{github.workspace}}/Update/update_android.xml .
MD5=`md5sum Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk | awk '{print $1}'`
echo "MD5:${MD5}"
sed -i "s/<VERSION>.*</<VERSION>${{env.Calendar_VERSION}}</g" update_android.xml
sed -i "s/<INFO>.*</<INFO>Release Calendar ${{env.Calendar_VERSION}}</g" update_android.xml
sed -i "s/<TIME>.*</<TIME>`date`</g" update_android.xml
sed -i "s/<ARCHITECTURE>.*</<ARCHITECTURE>${{matrix.qt_arch}}</g" update_android.xml
sed -i "s/<MD5SUM>.*</<MD5SUM>${MD5}</g" update_android.xml
sed -i "s:<URL>.*<:<URL>https\://github.com/KangLin/Calendar/releases/download/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk<:g" update_android.xml
sed -i "s/<MIN_UPDATE_VERSION>.*</<MIN_UPDATE_VERSION>${{env.Calendar_VERSION}}</g" update_android.xml
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v3
Expand All @@ -153,3 +168,4 @@ jobs:
path: |
${{github.workspace}}/build/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk
${{github.workspace}}/build/update_${{matrix.qt_arch}}_${{matrix.qt_version}}.json
${{github.workspace}}/build/update_android.xml
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: build
env:
artifact_path: artifact_path
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Calendar_VERSION: v1.0.17
Calendar_VERSION: v1.0.18

on:
push:
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
# echo "Get file signatures in linux: md5sum file" >> ${{github.workspace}}/Note.md

- name: Upload To Github Release
#if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: ${{ startsWith(github.ref, 'refs/tags/') }}
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
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install
qt_modules: qtwebengine ${{matrix.qt_modules}}
Calendar_VERSION: 1.0.17
Calendar_VERSION: 1.0.18
artifact_name: build_macos
VCPKGGITCOMMITID: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6

Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
CMAKE_GENERATOR: "Visual Studio 17 2022"
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
Calendar_VERSION: v1.0.17
Calendar_VERSION: v1.0.18
VCPKGGITCOMMITID: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
qt_modules: ${{matrix.qt_modules}}
artifact_name: build_msvc
Expand Down Expand Up @@ -137,14 +137,6 @@ jobs:
makensis Install.nsi
copy Calendar_Setup_${{env.Calendar_VERSION}}.exe Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe
# - name: Update version configure file
# if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '5.12.12' }}
# working-directory: ${{github.workspace}}\build
# run: |
# .\install\bin\CalendarApp.exe ^
# -f "${{github.workspace}}\build\version.json" ^
# --foc 0

- name: Update configure file
if: ${{ matrix.BUILD_TYPE == 'Release' }}
working-directory: ${{github.workspace}}\build
Expand All @@ -156,6 +148,12 @@ jobs:
-m "${{env.Calendar_VERSION}}" ^
-u "https://github.com/KangLin/Calendar/releases/download/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe;https://sourceforge.net/projects/rabbitcalendar/files/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe"
- name: Update xml file
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '5.12.12' }}
working-directory: ${{github.workspace}}\build
run: |
mv update_${{matrix.qt_arch}}_${{matrix.qt_version}}.json.xml update_windows.xml
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release'}}
uses: actions/upload-artifact@v3
Expand All @@ -164,4 +162,4 @@ jobs:
path: |
${{github.workspace}}\build\Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe
${{github.workspace}}\build\update_${{matrix.qt_arch}}_${{matrix.qt_version}}.json
${{github.workspace}}\build\update_${{matrix.qt_arch}}_${{matrix.qt_version}}.json.xml
${{github.workspace}}\build\update_windows.xml
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_ubuntu
Calendar_VERSION: 1.0.17
Calendar_VERSION: 1.0.18
artifact_name: build_ubuntu

# Map the job outputs to step outputs
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ before_install:
- sudo Xvfb :99 -ac &
- export DISPLAY=:99.0
- mkdir -p ${SOURCE_DIR}/Tools
- export VERSION="v1.0.17"
- export VERSION="v1.0.18"

install:
- cd ${SOURCE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion App/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package="org.KangLinStudio.Calendar"
android:installLocation="auto"
android:versionCode="1"
android:versionName="1.0.17">
android:versionName="1.0.18">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ GET_VERSION(OUT_VERSION Calendar_VERSION
OUT_REVISION Calendar_REVISION)
message("Calendar_VERSION:${Calendar_VERSION}; Calendar_REVISION:${Calendar_REVISION}")
if(NOT Calendar_VERSION)
set(Calendar_VERSION "v1.0.17")
set(Calendar_VERSION "v1.0.18")
endif()
set(VERSION ${Calendar_VERSION})

Expand Down
2 changes: 1 addition & 1 deletion Install/Install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Calendar"
!define PRODUCT_APP_NAME "CalendarApp"
!define PRODUCT_VERSION "v1.0.17"
!define PRODUCT_VERSION "v1.0.18"
!define PRODUCT_PUBLISHER "KangLin studio"
!define PRODUCT_WEB_SITE "https://github.com/KangLin/${PRODUCT_NAME}"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}.exe"
Expand Down
7 changes: 7 additions & 0 deletions Update/update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"redirect": [
{
"version":"v1.0.18"
}
]
}
14 changes: 7 additions & 7 deletions Update/update.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version='1.0' encoding='UTF-8'?>
<REDIRECT>
<VERSION>v1.0.17</VERSION>
<VERSION>v1.0.18</VERSION>
<WINDOWS>
<URL>https://github.com/KangLin/Calendar/releases/download/v1.0.17/update_windows.xml</URL>
<URL>https://sourceforge.net/projects/rabbitcalendar/files/v1.0.17/update_windows.xml/download</URL>
<URL>https://github.com/KangLin/Calendar/releases/download/v1.0.18/update_windows.xml</URL>
<URL>https://sourceforge.net/projects/rabbitcalendar/files/v1.0.18/update_windows.xml/download</URL>
</WINDOWS>
<LINUX>
<URL>https://github.com/KangLin/Calendar/releases/download/v1.0.17/update_linux.xml</URL>
<URL>https://sourceforge.net/projects/rabbitcalendar/files/v1.0.17/update_linux.xml/download</URL>
<URL>https://github.com/KangLin/Calendar/releases/download/v1.0.18/update_linux.xml</URL>
<URL>https://sourceforge.net/projects/rabbitcalendar/files/v1.0.18/update_linux.xml/download</URL>
</LINUX>
<LINUX_APPIMAGE>
<URL>https://github.com/KangLin/Calendar/releases/download/v1.0.17/update_linux.xml</URL>
<URL>https://sourceforge.net/projects/rabbitcalendar/files/v1.0.17/update_linux.xml/download</URL>
<URL>https://github.com/KangLin/Calendar/releases/download/v1.0.18/update_linux.xml</URL>
<URL>https://sourceforge.net/projects/rabbitcalendar/files/v1.0.18/update_linux.xml/download</URL>
</LINUX_APPIMAGE>
</REDIRECT>
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#TODO: Change version
version: 'v1.0.17.{build}'
version: 'v1.0.18.{build}'

cache:
- ..\other_source
Expand Down
4 changes: 2 additions & 2 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ esac

export PKG_CONFIG_PATH=${ThirdLibs_DIR}/lib/pkgconfig:${PKG_CONFIG_PATH}
if [ -n "$appveyor_build_version" -a -z "$VERSION" ]; then
export VERSION="v1.0.17"
export VERSION="v1.0.18"
fi
if [ -z "$VERSION" ]; then
export VERSION="v1.0.17"
export VERSION="v1.0.18"
fi

export UPLOADTOOL_BODY="Release Calendar ${VERSION}.<br> The change see [ChangeLog.md](ChangeLog.md) or [ChangeLog_zh_CN.md](ChangeLog_zh_CN.md)"
Expand Down
6 changes: 3 additions & 3 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rabbitcalendar (1.0.17) unstable; urgency=medium
rabbitcalendar (1.0.18) unstable; urgency=medium

* Modify debian package

-- Kang Lin <[email protected]> Sat, 20 Apr 2019 19:53:02 -0700

-- Kang Lin <[email protected]> Mon, 05 Feb 2024 13:10:51 +0800
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sed -i "s/Calendar_VERSION:.*/Calendar_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.git
sed -i "s/Calendar_VERSION:.*/Calendar_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.github/workflows/mingw.yml
sed -i "s/Calendar_VERSION:.*/Calendar_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.github/workflows/android.yml
sed -i "s/Calendar_VERSION:.*/Calendar_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.github/workflows/build.yml

sed -i "s/ \"version\":[[:blank:]]*\"v\?[0-9]\+\.[0-9]\+\.[0-9]\+\"/ \"version\":\"${VERSION}\"/g" ${SOURCE_DIR}/Update/update.json

DEBIAN_VERSION=`echo ${VERSION}|cut -d "v" -f 2`
sed -i "s/calendar (.*)/calendar (${DEBIAN_VERSION})/g" ${SOURCE_DIR}/debian/changelog
Expand Down

0 comments on commit 5c6dadc

Please sign in to comment.