init upload
test-clang-format / build (push) Canceled after 0s

This commit is contained in:
wullie committed 2026-11-08 14:03:29 +00:00
commit a7c3157345
496 files changed
+171644

No files matched your search

+153
View File
@@ -0,0 +1,153 @@
name: Packaging(Linux - ARM)
on:
#push:
# branches:
# - master
# - fix*
# - move-arm-ci-to-new-ci
# paths-ignore:
# - 'README.md'
# - 'LICENSE'
# - 'docs/**'
workflow_dispatch:
env:
PRODUCT: flameshot
RELEASE: 1
# dockerfiles, see https://github.com/flameshot-org/flameshot-dockerfiles
# docker images, see https://quay.io/repository/flameshot-org/ci-building
DOCKER_REPO: quay.io/flameshot-org/ci-building
# building tool: https://github.com/flameshot-org/packpack
PACKPACK_REPO: flameshot-org/packpack
jobs:
deb-pack:
name: Build deb on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dist:
# - {
# name: debian-11,
# os: debian,
# symbol: bullseye,
# arch: armhf
# }
- {
name: debian-12,
os: debian,
symbol: bookworm,
arch: arm64
}
- {
name: debian-12,
os: debian,
symbol: bookworm,
arch: armhf
}
- {
name: ubuntu-22.04,
os: ubuntu,
symbol: jammy,
arch: arm64
}
- {
name: ubuntu-24.04,
os: ubuntu,
symbol: noble,
arch: arm64
}
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${ver_info}"
echo "================================"
# This will allow to build pre-preleases without git tag
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
echo "GIT_HASH=${git_hash}" >> $GITHUB_ENV
- name: Get packpack tool
uses: actions/checkout@v4
with:
repository: ${{ env.PACKPACK_REPO }}
path: tools
ref: multiarch
set-safe-directory: $GITHUB_WORKSPACE/tools
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
DOCKER_ARCH: ${{ matrix.dist.arch }}
run: |
case ${DOCKER_ARCH} in
arm32v7)
export ARCH=arm/v7
;;
armhf)
export ARCH=arm/v7
;;
arm64*)
export ARCH=arm64
;;
*)
export ARCH=${DOCKER_ARCH}
;;
esac
cp -r $GITHUB_WORKSPACE/packaging/debian $GITHUB_WORKSPACE
bash $GITHUB_WORKSPACE/tools/packpack
mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_${{ matrix.dist.arch }}.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb
- name: SHA256Sum of ${{ matrix.dist.name }} ${{ matrix.dist.arch }} package
run: |
cd "$GITHUB_WORKSPACE/build/" || { >&2 echo "Cannot cd to '$GITHUB_WORKSPACE/build/'!"; exit 11 ; }
sha256sum ${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb | tee ${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb.sha256sum
- name: Artifact Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-${{ matrix.dist.name }}-${{ matrix.dist.arch }}
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb.sha256sum
overwrite: true
+504
View File
@@ -0,0 +1,504 @@
name: Packaging(Linux)
on:
push:
branches:
- master
- fix*
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
- 'data/translations/*.ts'
workflow_dispatch:
env:
PRODUCT: flameshot
RELEASE: 1
# dockerfiles, see https://github.com/flameshot-org/flameshot-dockerfiles
# docker images, see https://quay.io/repository/flameshot-org/ci-building
DOCKER_REPO: quay.io/flameshot-org/ci-building
# building tool: https://github.com/flameshot-org/packpack
PACKPACK_REPO: flameshot-org/packpack
jobs:
deb-pack:
name: Build deb on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dist:
- {
name: debian-12,
os: debian,
symbol: bookworm,
arch: amd64
}
- {
name: ubuntu-22.04,
os: ubuntu,
symbol: jammy,
arch: amd64
}
- {
name: ubuntu-24.04,
os: ubuntu,
symbol: noble,
arch: amd64
}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${ver_info}"
echo "================================"
# This will allow to build pre-preleases without git tag
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
echo "GIT_HASH=${git_hash}" >> $GITHUB_ENV
- name: Get packpack tool
uses: actions/checkout@v4
with:
repository: ${{ env.PACKPACK_REPO }}
path: tools
ref: multiarch
set-safe-directory: $GITHUB_WORKSPACE/tools
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
PRESERVE_ENVVARS: "GIT_HASH"
run: |
cp -r $GITHUB_WORKSPACE/packaging/debian $GITHUB_WORKSPACE
bash $GITHUB_WORKSPACE/tools/packpack
mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_${{ matrix.dist.arch }}.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb
- name: SHA256Sum of ${{ matrix.dist.name }} ${{ matrix.dist.arch }} package
run: |
cd "$GITHUB_WORKSPACE/build/" || { >&2 echo "Cannot cd to '$GITHUB_WORKSPACE/build/'!"; exit 11 ; }
sha256sum ${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb | tee ${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb.sha256sum
- name: Artifact Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-${{ matrix.dist.name }}-${{ matrix.dist.arch }}
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb.sha256sum
overwrite: true
rpm-pack:
name: Build rpm on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dist:
- {
name: fedora-41,
os: fedora,
symbol: 41,
arch: x86_64
}
- {
name: fedora-42,
os: fedora,
symbol: 42,
arch: x86_64
}
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${ver_info}"
echo "================================"
# This will allow to build pre-preleases without git tag
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
echo "GIT_HASH=${git_hash}" >> $GITHUB_ENV
- name: Get packpack tool
uses: actions/checkout@v4
with:
repository: ${{ env.PACKPACK_REPO }}
path: tools
ref: master
set-safe-directory: $GITHUB_WORKSPACE/tools
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
if: matrix.dist.os == 'fedora'
run: |
mkdir $GITHUB_WORKSPACE/rpm
cp $GITHUB_WORKSPACE/packaging/rpm/fedora/flameshot.spec $GITHUB_WORKSPACE/rpm
bash $GITHUB_WORKSPACE/tools/packpack
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
PRESERVE_ENVVARS: "GIT_HASH"
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
if: matrix.dist.os == 'opensuse-leap'
run: |
mkdir $GITHUB_WORKSPACE/rpm
cp $GITHUB_WORKSPACE/packaging/rpm/opensuse/flameshot.spec $GITHUB_WORKSPACE/rpm
bash $GITHUB_WORKSPACE/tools/packpack
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
- name: Package Clean
if: matrix.dist.os == 'fedora'
run: |
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-debuginfo-*.rpm
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-debugsource-*.rpm
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-*.src.rpm
rm -f ${{ github.workspace }}/build/build.log
- name: SHA256Sum of ${{ matrix.dist.name }} ${{ matrix.dist.arch }} package
if: matrix.dist.os == 'fedora'
run: |
cd "$GITHUB_WORKSPACE/build/" || { >&2 echo "Cannot cd to '$GITHUB_WORKSPACE/build/'!"; exit 11 ; }
sha256sum ${PRODUCT}-${VERSION}-${RELEASE}.fc*.${{ matrix.dist.arch }}.rpm | tee ${PRODUCT}-${VERSION}-${RELEASE}.fc${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm.sha256sum
- name: SHA256Sum of ${{ matrix.dist.name }} ${{ matrix.dist.arch }} package
if: matrix.dist.os == 'opensuse-leap'
run: |
mv $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-lp*.${{ matrix.dist.arch }}.rpm $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm
cd "$GITHUB_WORKSPACE/build/" || { >&2 echo "Cannot cd to '$GITHUB_WORKSPACE/build/'!"; exit 11 ; }
sha256sum ${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm | tee ${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm.sha256sum
- name: Artifact Upload
if: matrix.dist.os == 'fedora'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-${{ matrix.dist.name }}-${{ matrix.dist.arch }}
path: |
${{ github.workspace }}/build/
overwrite: true
- name: Artifact Upload
if: matrix.dist.os == 'opensuse-leap'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-${{ matrix.dist.name }}-${{ matrix.dist.arch }}
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm.sha256sum
overwrite: true
appimage-pack:
name: Build appimage on ${{ matrix.config.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {
name: ubuntu-22.04,
os: ubuntu,
symbol: jammy,
arch: amd64,
image_repo: quay.io/flameshot-org/ci-building
}
container:
image: ${{ matrix.config.image_repo }}:${{ matrix.config.os }}-${{ matrix.config.symbol }}
options: --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined
steps:
- name: Configure git safe directory
shell: bash
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${ver_info}"
echo "================================"
# This will allow to build pre-preleases without git tag
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
echo "GIT_HASH=${git_hash}" >> $GITHUB_ENV
- name: Install Dependencies
run: |
sudo apt-get -y -qq update
sudo apt-get -y --no-install-recommends install fuse cmake extra-cmake-modules build-essential qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6svg6-dev qt6-l10n-tools qt6-wayland libgl-dev appstream hicolor-icon-theme openssl ca-certificates jq
- name: Download linuxdeploy
run: |
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
chmod a+x linuxdeploy-x86_64.AppImage
LINUXDEPLOY_BIN=${PWD}/linuxdeploy-x86_64.AppImage
- name: Download linuxdeployqt-plugin-appimage
run: |
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage"
chmod a+x linuxdeploy-plugin-appimage-x86_64.AppImage
- name: Download linuxdeployqt-plugin-qt
run: |
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage
- name: Packaging appimage
run: |
set -x
APPIMAGE_DST_PATH=$GITHUB_WORKSPACE/${PRODUCT}.AppDir
mkdir -p ${APPIMAGE_DST_PATH}
cd $GITHUB_WORKSPACE
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DUSE_LAUNCHER_ABSOLUTE_PATH:BOOL=OFF
make -j$(nproc) DESTDIR=${APPIMAGE_DST_PATH} install
rm -rf ${APPIMAGE_DST_PATH}/usr/include
rm -rf ${APPIMAGE_DST_PATH}/usr/lib
export EXTRA_PLATFORM_PLUGINS="libqwayland-generic.so"
export EXTRA_QT_MODULES="waylandcompositor"
export QMAKE=/usr/lib/qt6/bin/qmake
${PWD}/linuxdeploy-x86_64.AppImage --appdir ${APPIMAGE_DST_PATH} --plugin qt --output appimage
mv $GITHUB_WORKSPACE/Flameshot-${VERSION}-x86_64.AppImage $GITHUB_WORKSPACE/Flameshot-${VERSION}.x86_64.AppImage
- name: SHA256Sum of appimage package
run: |
cd "$GITHUB_WORKSPACE/" || { >&2 echo "Cannot cd to '$GITHUB_WORKSPACE/'!"; exit 11 ; }
sha256sum Flameshot-${VERSION}.x86_64.AppImage | tee Flameshot-${VERSION}.x86_64.AppImage.sha256sum
- name: Artifact Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-appimage-x86_64
path: |
${{ github.workspace }}/Flameshot-*.x86_64.AppImage
${{ github.workspace }}/Flameshot-*.x86_64.AppImage.sha256sum
overwrite: true
flatpak-pack:
name: Build flatpak on ubuntu 24.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${ver_info}"
echo "================================"
# This will allow to build pre-preleases without git tag
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
echo "GIT_HASH=${git_hash}" >> $GITHUB_ENV
- name: Setup flatpak
run: |
sudo apt-get -y -qq update
sudo apt-get install -y flatpak flatpak-builder
- name: Setup Flathub
run: |
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y --noninteractive flathub org.kde.Sdk//6.9 org.kde.Platform//6.9
- name: Packaging flatpak
run: |
BUNDLE="org.flameshot.Flameshot_${VERSION}_x86_64.flatpak"
MANIFEST_PATH=$GITHUB_WORKSPACE/packaging/flatpak/org.flameshot.Flameshot.yml
RUNTIME_REPO="https://flathub.org/repo/flathub.flatpakrepo"
APP_ID="org.flameshot.Flameshot"
BRANCH="master"
flatpak-builder --user --disable-rofiles-fuse --repo=repo --force-clean flatpak_app ${MANIFEST_PATH} --install-deps-from=flathub
flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
mv $GITHUB_WORKSPACE/org.flameshot.Flameshot_${VERSION}_x86_64.flatpak $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.x86_64.flatpak
- name: SHA256Sum of flatpak package
run: |
cd "$GITHUB_WORKSPACE/" || { >&2 echo "Cannot cd to '$GITHUB_WORKSPACE/'!"; exit 11 ; }
sha256sum org.flameshot.Flameshot-${VERSION}.x86_64.flatpak | tee org.flameshot.Flameshot-${VERSION}.x86_64.flatpak.sha256sum
- name: Artifact Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-flatpak-x86_64
path: |
${{ github.workspace }}/org.flameshot.Flameshot-*.x86_64.flatpak
${{ github.workspace }}/org.flameshot.Flameshot-*.x86_64.flatpak.sha256sum
overwrite: true
snap-pack:
name: Build snap on ubuntu latest
runs-on: ubuntu-latest
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${ver_info}"
echo "================================"
# This will allow to build pre-preleases without git tag
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
echo "GIT_HASH=${git_hash}" >> $GITHUB_ENV
- name: Packaging snap
uses: snapcore/action-build@v1
id: snapcraft
- name: Rename snap name
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/build
cp ${{ steps.snapcraft.outputs.snap }} $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap
- name: SHA256Sum of snap package
run: |
cd "$GITHUB_WORKSPACE/build/" || { >&2 echo "Cannot cd to '$GITHUB_WORKSPACE/build/'!"; exit 11 ; }
sha256sum ${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap | tee ${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap.sha256sum
- name: Artifact Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-snap-x86_64
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap.sha256sum
overwrite: true
+99
View File
@@ -0,0 +1,99 @@
name: Packaging(MacOS)
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
- 'data/translations/*.ts'
workflow_dispatch:
env:
PRODUCT: flameshot
jobs:
dmg-pack:
name: Build dmg on ${{ matrix.dist.os }} ${{ matrix.dist.arch }}
strategy:
fail-fast: false
matrix:
dist:
- {
os: macos-14,
arch: arm64
}
- {
os: macos-13,
arch: intel
}
runs-on: ${{ matrix.dist.os }}
env:
APP_NAME: flameshot
DIR_BUILD: build
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${ver_info}"
echo "================================"
# This will allow to build pre-preleases without git tag
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
echo "GIT_HASH=${git_hash}" >> $GITHUB_ENV
- name: Install Qt
run: brew install qt@6
- name: Configure
run: |
rm -rf "${DIR_BUILD}"/src/flameshot.dmg "${DIR_BUILD}"/src/flameshot.app/
cmake -GNinja -S . -B "${DIR_BUILD}" -DQt6_DIR=$(brew --prefix qt6)/lib/cmake/Qt6 -DUSE_MONOCHROME_ICON=True
- name: Compile
run: |
cmake --build "${DIR_BUILD}"
- name: Build dmg package
run: |
cd "${DIR_BUILD}"
ninja create_dmg
- name: Artifact Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-macos-${{ matrix.dist.arch }}
path: ${{ github.workspace }}/build/src/Flameshot-${{ env.VERSION }}.dmg
overwrite: true
+197
View File
@@ -0,0 +1,197 @@
name: Packaging(Windows)
on:
push:
branches:
- master
- fix*
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
- 'data/translations/*.ts'
workflow_dispatch:
env:
PRODUCT: flameshot
jobs:
windows-pack:
name: VS 2022 ${{ matrix.config.arch }}-${{ matrix.type }}
runs-on: windows-2025
env:
VCINSTALLDIR: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC
# 2025.02.14
VCPKG_VERSION: d5ec528843d29e3a52d745a64b469f810b2cedbf
VCPKG_PACKAGES: openssl-windows
OPENSSL_ROOT_DIR: ${{ github.workspace }}\vcpkg\installed\${{ matrix.config.vcpkg_triplet }}\
strategy:
fail-fast: false
matrix:
qt_ver: [6.9.1]
qt_target: [desktop]
config:
- {
arch: x64,
generator: "-G'Visual Studio 17 2022' -A x64",
vcpkg_triplet: x64-windows,
qt_arch: win64_msvc2022_64,
qt_arch_install: msvc2022_64,
pak_arch: win64
}
type: [portable, installer]
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Fix Python path
shell: pwsh
run: |
Remove-Item "$env:LOCALAPPDATA\Microsoft\WindowsApps\python*.exe" -Force -ErrorAction SilentlyContinue
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${ver_info}"
echo "================================"
# This will allow to build pre-preleases without git tag
# echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
echo "GIT_HASH=${git_hash}" >> $GITHUB_ENV
- name: Restore from cache and run vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgArguments: ${{env.VCPKG_PACKAGES}}
vcpkgDirectory: '${{ github.workspace }}\vcpkg'
appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_ver }}
cache: 'true'
cache-key-prefix: install-qt-action-${{ matrix.qt_ver }}
target: ${{ matrix.qt_target }}
arch: ${{ matrix.config.qt_arch }}
modules: 'qtimageformats'
dir: '${{ github.workspace }}/build/'
- name: Configure
working-directory: build
shell: pwsh
run: |
cmake .. ${{matrix.config.generator}} `
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
-DENABLE_OPENSSL=ON `
-DCMAKE_BUILD_TYPE=Release `
-DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }}
- name: Compile
working-directory: build
shell: pwsh
run: cmake --build . --config Release
- name: CPack
working-directory: build
shell: pwsh
run: |
# Chocolately made their own package called cpack and its first in the path. This is a hack since we are only using cmake's cpack, doesn't seem to be required after a CI update
#Remove-Item C:\ProgramData\Chocolatey\bin\cpack.exe
If ($env:TYPE -eq "installer")
{
cpack -G WIX -B "$env:GITHUB_WORKSPACE\build\Package"
}
ElseIf($env:TYPE -eq "portable")
{
cpack -G ZIP -B "$env:GITHUB_WORKSPACE\build\Package"
}
env:
TYPE: ${{matrix.type}}
- name: Package Clean
shell: pwsh
run: |
# Remove-Item $env:GITHUB_WORKSPACE\build\Package\_CPack_Packages -Recurse
New-Item -Path $env:GITHUB_WORKSPACE\build\Package\installer -ItemType Directory
New-Item -Path $env:GITHUB_WORKSPACE\build\Package\portable -ItemType Directory
- name: Package Prepare (installer)
if: matrix.type == 'installer'
shell: pwsh
run: |
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
- name: Package Prepare (portable)
if: matrix.type == 'portable'
shell: pwsh
run: |
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
- name: SHA256Sum of Windows installer
if: matrix.type == 'installer'
shell: bash
run: |
sha256sum $GITHUB_WORKSPACE/build/Package/installer/Flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.msi
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
- name: SHA256Sum of Windows portable
if: matrix.type == 'portable'
shell: bash
run: |
sha256sum $GITHUB_WORKSPACE/build/Package/portable/flameshot-${{ env.VERSION }}-${{ matrix.config.pak_arch }}.zip
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
- name: Artifact Upload
if: matrix.type == 'installer'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-win-${{ matrix.config.arch }}-${{ matrix.type }}
path: |
${{ 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
overwrite: true
- name: Artifact Upload
if: matrix.type == 'portable'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-win-${{ matrix.config.arch }}-${{ matrix.type }}
path: |
${{ 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
overwrite: true
+132
View File
@@ -0,0 +1,132 @@
name: Building(CMake)
on:
push:
branches: [ master ]
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
pull_request:
branches: [ master ]
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
- 'data/translations/*.ts'
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
jobs:
linux-build:
name: ${{ matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Source code
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Install Dependencies
run: |
sudo apt-get -y -qq update
sudo apt-get -y --no-install-recommends install \
cmake \
extra-cmake-modules \
build-essential \
qt6-base-dev \
qt6-svg-dev \
qt6-tools-dev \
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
#
# We need to source the profile file to make sure conan is in PATH
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE
windows-build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows 2022 MSVC",
artifact: "Windows-MSVC.tar.xz",
os: windows-2022,
cc: "cl", cxx: "cl",
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
qt_ver: '6.9.1'
}
steps:
- uses: actions/checkout@v4
- name: Fix Python path
shell: pwsh
run: |
Remove-Item "$env:LOCALAPPDATA\Microsoft\WindowsApps\python*.exe" -Force -ErrorAction SilentlyContinue
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.config.qt_ver }}
cache: 'true'
cache-key-prefix: install-qt-action-${{ matrix.config.qt_ver }}
target: desktop
dir: '${{ github.workspace }}/build/'
- name: Configure
working-directory: build
shell: powershell
run: |
cmake -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE ../
- name: Build
working-directory: build
shell: powershell
run: |
cmake --build . --config $env:BUILD_TYPE
+37
View File
@@ -0,0 +1,37 @@
name: test-clang-format
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
- 'data/translations/*.ts'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
- 'data/translations/*.ts'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v4
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: DoozyX/[email protected]
with:
source: './src'
extensions: 'h,cpp'
clangFormatVersion: 11
style: file
+75
View File
@@ -0,0 +1,75 @@
name: Deploy developer docs
on:
push:
branches: [ master, docs ]
paths:
- 'src/**'
- 'docs/dev/**'
- '.github/workflows/deploy-dev-docs.yml'
jobs:
build-and-deploy:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get --yes --quiet update
sudo apt-get --yes --no-install-recommends install doxygen
pip install \
mkdocs \
mkdocs-material \
git+https://github.com/veracioux/[email protected]
- name: Checkout flameshot source
uses: actions/checkout@v4
with:
path: 'flameshot'
- name: Build docs
working-directory: ${{github.workspace}}/flameshot/docs/dev
run: |
make build
- name: Checkout flameshot website
uses: actions/checkout@v4
with:
repository: 'flameshot-org/flameshot-org.github.io'
ref: 'gh-pages'
path: 'website'
- name: Configure git credentials for website repo
working-directory: ${{github.workspace}}/website
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git config http.https://github.com/.extraheader 'AUTHORIZATION basic ${{secrets.TOKEN_PUSH_TO_WEBSITE_REPO}}'
git remote add destination "https://x-access-token:${{secrets.TOKEN_PUSH_TO_WEBSITE_REPO}}@github.com/flameshot-org/flameshot-org.github.io"
- name: Add developer docs to website deployment
working-directory: ${{github.workspace}}/website
run: |
# Create empty dev-docs-staging branch
git checkout --orphan dev-docs-staging
git rm -r --cached .
rm -rf docs/dev
# Copy generated docs over
mkdir -p docs
mv "${{github.workspace}}/flameshot/docs/dev/output" \
"./docs/dev"
# Commit docs/dev to the dev-docs-staging branch
git add docs/dev
HASH="$(git --git-dir="${{github.workspace}}/flameshot/.git" rev-parse HEAD)"
git commit --message "Add developer docs from flameshot@$HASH"
# Apply changes to gh-pages
git checkout --force gh-pages
git checkout dev-docs-staging -- docs/dev
# Commit (we use `|| true` because the commit could be empty and thus fail)
git commit --message "Add developer docs from flameshot@$HASH" || true
- name: Push to website repo
working-directory: ${{github.workspace}}/website
run: |
git push --force destination dev-docs-staging
git push destination gh-pages