Skip to content

Commit 3b5459f

Browse files
authored
ci: some improvements (#3863)
* ci: update linux pack distribution matrix - drop debian 10, fedora 39, opensuse 15.5 build - add fedora 41 build * ci: simplify docker buildx and qemu setup * ci: segmented ci artifact - remove third party upload scripts * ci: add version details info into artifact name
1 parent 73aad3c commit 3b5459f

File tree

8 files changed

+80
-970
lines changed

8 files changed

+80
-970
lines changed

Diff for: .github/workflows/Linux-pack.yml

+34-154
Large diffs are not rendered by default.

Diff for: .github/workflows/MacOS-pack.yml

+17-12
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ env:
2020
PRODUCT: flameshot
2121

2222
jobs:
23-
catalina:
24-
name: macOS Monterey 12
25-
runs-on: macos-12
23+
x86_64:
24+
name: macOS Sonoma 14
25+
runs-on: macos-14
2626

2727
env:
2828
APP_NAME: flameshot
@@ -49,6 +49,19 @@ jobs:
4949
- name: Checkout Source code
5050
uses: actions/checkout@v4
5151

52+
- name: Set env & Print flameshot version
53+
shell: bash
54+
run: |
55+
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
56+
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
57+
git_hash=$(git rev-parse --short HEAD)
58+
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
59+
echo "=======FLAMESHOT VERSION========"
60+
echo ${last_committed_tag:1}
61+
echo "Details: ${ver_info}"
62+
echo "================================"
63+
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
64+
5265
- name: Install Qt
5366
run: brew install qt@5 cmake
5467

@@ -71,18 +84,10 @@ jobs:
7184
cd "${DIR_PKG}"
7285
${HELPERS_SCRIPTS_PATH}/sign_qtapp.sh flameshot
7386
74-
- name: Upload dmg package
75-
shell: bash
76-
run: |
77-
python3 -m pip install -U -q requests
78-
echo "================MacOS dmg image download link================"
79-
echo $(python3 $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/src/flameshot.dmg)
80-
echo "=====no operation for you can see link in the log console====="
81-
8287
- name: Artifact Upload
8388
uses: actions/upload-artifact@v4
8489
with:
85-
name: MacOS-artifact
90+
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-macos-x86_64
8691
path: ${{ github.workspace }}/build/src/flameshot.dmg
8792
overwrite: true
8893

Diff for: .github/workflows/Windows-pack.yml

+29-39
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
VCINSTALLDIR: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/
3131
Qt5_DIR: ${{ github.workspace }}\build\Qt\${{ matrix.qt_ver }}\${{ matrix.config.qt_arch_install }}\lib\cmake\Qt5\
3232
QTDIR: ${{ github.workspace }}\build\Qt\${{ matrix.qt_ver }}\${{ matrix.config.qt_arch_install }}\
33-
# 2022.06.15.1
34-
VCPKG_VERSION: cef0b3ec767df6e83806899fe9525f6cf8d7bc91
33+
# 2025.02.14
34+
VCPKG_VERSION: d5ec528843d29e3a52d745a64b469f810b2cedbf
3535
VCPKG_PACKAGES: openssl-windows
3636
OPENSSL_ROOT_DIR: ${{ github.workspace }}\vcpkg\installed\${{ matrix.config.vcpkg_triplet }}\
3737
strategy:
@@ -78,13 +78,15 @@ jobs:
7878
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
7979
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
8080
git_hash=$(git rev-parse --short HEAD)
81+
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
8182
echo "=======FLAMESHOT VERSION========"
8283
echo ${last_committed_tag:1}
83-
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
84+
echo "Details: ${ver_info}"
8485
echo "================================"
8586
# This will allow to build pre-preleases without git tag
8687
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
8788
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
89+
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
8890
8991
- name: Restore from cache and run vcpkg
9092
uses: lukka/run-vcpkg@v11
@@ -103,7 +105,7 @@ jobs:
103105
key: ${{ runner.os }}-QtCache/${{ matrix.qt_ver }}/${{ matrix.config.qt_arch }}
104106

105107
- name: Install Qt
106-
uses: jurplel/install-qt-action@v3
108+
uses: jurplel/install-qt-action@v4
107109
with:
108110
version: ${{ matrix.qt_ver }}
109111
target: ${{ matrix.qt_target }}
@@ -155,56 +157,44 @@ jobs:
155157
if: matrix.type == 'installer'
156158
shell: pwsh
157159
run: |
158-
Move-Item -Path $env:GITHUB_WORKSPACE/build/Package/Flameshot-*-${{ matrix.config.pak_arch }}.msi -Destination $env:GITHUB_WORKSPACE/build/Package/installer/Flameshot-$env:VERSION-${{ matrix.config.pak_arch }}.msi
160+
Move-Item -Path $env:GITHUB_WORKSPACE/build/Package/Flameshot-*-${{ matrix.config.pak_arch }}.msi -Destination $env:GITHUB_WORKSPACE/build/Package/installer/Flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.msi
159161
160162
- name: Package Prepare (portable)
161163
if: matrix.type == 'portable'
162164
shell: pwsh
163165
run: |
164-
Move-Item -Path $env:GITHUB_WORKSPACE/build/Package/flameshot-*-${{ matrix.config.pak_arch }}.zip -Destination $env:GITHUB_WORKSPACE/build/Package/portable/flameshot-$env:VERSION-${{ matrix.config.pak_arch }}.zip
166+
Move-Item -Path $env:GITHUB_WORKSPACE/build/Package/flameshot-*-${{ matrix.config.pak_arch }}.zip -Destination $env:GITHUB_WORKSPACE/build/Package/portable/flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.zip
165167
166-
- name: SHA256Sum of Windows installer(daily build)
168+
- name: SHA256Sum of Windows installer
167169
if: matrix.type == 'installer'
168170
shell: bash
169171
run: |
170-
sha256sum $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi
171-
sha256sum $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi > $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi.sha256sum
172-
python -m pip install -U -q requests
173-
echo "============Windows installer sha256sum download link============"
174-
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi.sha256sum)
175-
echo "=======no operation for you can see link in the log console====="
176-
177-
- name: SHA256Sum of Windows portable(daily build)
172+
sha256sum $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.msi
173+
sha256sum $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.msi > $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.msi.sha256sum
174+
175+
- name: SHA256Sum of Windows portable
178176
if: matrix.type == 'portable'
179177
shell: bash
180178
run: |
181-
sha256sum $GITHUB_WORKSPACE/build/Package/portable/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip
182-
sha256sum $GITHUB_WORKSPACE/build/Package/portable/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip > $GITHUB_WORKSPACE/build/Package/portable/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip.sha256sum
183-
python -m pip install -U -q requests
184-
echo "===========Windows portable sha256sum download link============"
185-
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/portable/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip.sha256sum)
186-
echo "=====no operation for you can see link in the log console====="
187-
188-
- name: Upload Windows installer(daily build)
179+
sha256sum $GITHUB_WORKSPACE/build/Package/portable/flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.zip
180+
sha256sum $GITHUB_WORKSPACE/build/Package/portable/flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.zip > $GITHUB_WORKSPACE/build/Package/portable/flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.zip.sha256sum
181+
182+
- name: Artifact Upload
189183
if: matrix.type == 'installer'
190-
shell: bash
191-
run: |
192-
python -m pip install -U -q requests
193-
echo "================Windows installer download link================"
194-
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi)
195-
echo "=====no operation for you can see link in the log console====="
184+
uses: actions/upload-artifact@v4
185+
with:
186+
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-win-${{ matrix.config.arch }}-${{ matrix.type }}
187+
path: |
188+
${{ github.workspace }}/build/Package/installer/Flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.msi
189+
${{ github.workspace }}/build/Package/installer/Flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.msi.sha256sum
190+
overwrite: true
196191

197-
- name: Upload Windows portable(daily build)
198-
if: matrix.type == 'portable'
199-
shell: bash
200-
run: |
201-
python -m pip install -U -q requests
202-
echo "=================Windows portable download link================"
203-
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/portable/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip)
204-
echo "=====no operation for you can see link in the log console====="
205192
- name: Artifact Upload
193+
if: matrix.type == 'portable'
206194
uses: actions/upload-artifact@v4
207195
with:
208-
name: Windows-${{ matrix.config.arch }}-${{ matrix.type }}-artifact
209-
path: ${{ github.workspace }}/build/Package/*
196+
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-win-${{ matrix.config.arch }}-${{ matrix.type }}
197+
path: |
198+
${{ github.workspace }}/build/Package/portable/flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.zip
199+
${{ github.workspace }}/build/Package/portable/flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.zip.sha256sum
210200
overwrite: true

Diff for: scripts/.gitkeep

Whitespace-only changes.

Diff for: scripts/upload_services/0x0.st.sh

-25
This file was deleted.

Diff for: scripts/upload_services/file.io.sh

-26
This file was deleted.

0 commit comments

Comments
 (0)