Skip to content

Commit

Permalink
[Release v2.2.9] QArchive v2.2.9 release
Browse files Browse the repository at this point in the history
This is a minor release, no need to update to this version.

# Changelog

   * Added QARCHIVE_VERSION_STR symbolic constant to report
     QArchive version to the users.

   * Fix tests

# CI/CD Changes

   * Added prebuilds for Windows Users, MSVC x64 builds will
     be uploaded to the new releases automatically.

   * Also upload prebuilt library of each commit to continuous
     tag for users to test and consume.

Signed-off-by: Divya Antony J R <[email protected]>
  • Loading branch information
antony-jr committed Dec 11, 2023
1 parent ed558f7 commit e67bdb5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 19 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,22 @@ jobs:
notify:
runs-on: ubuntu-latest
name: Notify Qt Modules Repository
needs: [windows-msvc]
needs: [check, windows-msvc]
if: needs.check.outputs.deploy != 'false'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Trigger
env:
GITHUB_TOKEN: $${{ secrets.QTMODULES_TOKEN }}
run: gh api repos/antony-jr/qtmodules/dispatches --raw-field event_type=qarchive
GH_TOKEN: ${{ secrets.QTMODULES_TOKEN }}
GITHUB_TOKEN: ${{ secrets.QTMODULES_TOKEN }}
run: gh --repo antony-jr/qtmodules workflow run gh-pages

windows-msvc:
if: "!contains(github.event.head_commit.message, '[skip builds]')"
runs-on: windows-2019
needs: check
if: needs.check.outputs.deploy != 'false'
name: windows-msvc-v${{ matrix.toolset }}-${{ matrix.arch }}-qt-${{ matrix.qt_version }}-${{ matrix.build_type }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -117,13 +119,23 @@ jobs:
cd ${{ github.workspace }}/output/
7z a ${{ github.workspace }}/upload/windows-msvc-v${{ matrix.toolset }}-qt-${{ matrix.qt_version }}-${{ matrix.arch }}-${{ matrix.build_type }}.zip QArchive
- name: Upload Builds to Continuous
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/upload/windows-msvc-v${{ matrix.toolset }}-qt-${{ matrix.qt_version }}-${{ matrix.arch }}-${{ matrix.build_type }}.zip
tag: continuous
overwrite: true
prerelease: true
release_name: "Continuous Builds"
body: "Prebuilt QArchive from latest commit on master."

- id: upload_rel
if: needs.check.outputs.deploy != 'false'
name: Upload Asset
working-directory: ${{ github.workspace }}/upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.check.outputs.deploy }}
TAG: ${{ needs.check.outputs.deploy }}
run: |
gh release upload "$tag" \
--repo="$GITHUB_REPOSITORY" \
windows-msvc-v${{ matrix.toolset }}-qt-${{ matrix.qt_version }}-${{ matrix.arch }}-${{ matrix.build_type }}.zip
gh release upload "${{ env.TAG }}" --repo "${{ github.repository }}" windows-msvc-v${{ matrix.toolset }}-qt-${{ matrix.qt_version }}-${{ matrix.arch }}-${{ matrix.build_type }}.zip
9 changes: 3 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ jobs:
- id: git
name: Check Commit Message
run: |
git clone https://github.com/antony-jr/QArchive qarc
cd qarc
git tag > /tmp/tags.txt
cd ..
rm -rf qarc
cat /tmp/tags.txt
# Don't need tags to check if the commit message has
# the special commit.
echo "" > /tmp/tags.txt
result=$(python3 scripts/check.py "$(git log -1 --pretty=%B)" "/tmp/tags.txt")
echo "deploy=$result" >> $GITHUB_OUTPUT
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# ---

CMAKE_MINIMUM_REQUIRED( VERSION 3.17)
project(QArchive VERSION 2.2.7)
project(QArchive VERSION 2.2.9)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down Expand Up @@ -63,8 +63,8 @@ else ()
find_package(LibArchive REQUIRED)
endif()

find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
if (NOT DEFINED QARCHIVE_QT_VERSION_MAJOR)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
set(QARCHIVE_QT_VERSION_MAJOR ${QT_VERSION_MAJOR})
endif()

Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'QArchive',
'cpp',
version: '2.2.7',
version: '2.2.9',
license: 'BSD-3-Clause',
default_options: ['cpp_std=c++17'],
meson_version: '>=0.49.0',
Expand Down
6 changes: 4 additions & 2 deletions scripts/bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ sed -i 's/QArchive VERSION .*/QArchive VERSION '$QARCHIVE_VERSION'\)/' CMakeList
sed -i "s/ version: .*/ version: '$QARCHIVE_VERSION',/" meson.build

cat > /tmp/qarchive.commit.template.txt << EOF
[Release $QARCHIVE_VERSION] QArchive v$QARCHIVE_VERSION release
[Release v$QARCHIVE_VERSION] QArchive v$QARCHIVE_VERSION release
#Changelog
# Changelog
* Change 1
* Change 2
Expand All @@ -30,7 +30,9 @@ git status

read -p "Do you want to commit? press any key to continue..."

git config --local core.commentchar ";"
git commit -S -t /tmp/qarchive.commit.template.txt
git config --local core.commentchar "#"

rm -rf /tmp/qarchive.commit.template.txt

Expand Down

0 comments on commit e67bdb5

Please sign in to comment.