-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
151 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
name: LinuxDeb | ||
on: | ||
# push代码时触发workflow | ||
push: | ||
paths-ignore: | ||
- 'README.md' | ||
- 'LICENSE' | ||
- 'buildToVS2019.bat' | ||
pull_request: | ||
paths-ignore: | ||
- 'README.md' | ||
- 'LICENSE' | ||
- 'buildToVS2019.bat' | ||
jobs: | ||
build: | ||
name: Build | ||
# 运行平台, ubuntu-latest 目前是 Ubuntu 20.04 | ||
# 参考文档 https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: # 矩阵配置 | ||
qt_ver: [5.12.11] # 参考: https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/linux_x64/desktop/qt5_51211 | ||
qt_target: [desktop] | ||
qt_arch: [gcc_64] | ||
os: [ubuntu-20.04] # ubuntu-18.04 | ||
env: | ||
targetName: PicShot | ||
targetLowerName: picshot | ||
targetOS: debian | ||
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: pull 3rdparty code | ||
run: | | ||
cd ${{github.workspace}} | ||
git submodule init | ||
git submodule update | ||
- name: NameVersion | ||
id: NameVersion | ||
if: startsWith(github.event.ref, 'refs/tags/') | ||
shell: pwsh | ||
run: | | ||
$systemInfo="${{ env.targetOS }}-x64" | ||
$productVersion="${{ github.ref }}".substring("refs/tags/v".length) | ||
$productName="${{ env.targetName }}-$productVersion-beta-protable-$systemInfo" | ||
$productDebName="${{ env.targetLowerName }}-$productVersion" | ||
echo "systemInfo=$systemInfo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "productVersion=$productVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "productName=$productName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "productDebName=$productDebName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
# 安装一些包 | ||
- name: AptInstallTool | ||
id: AptInstallTool | ||
if: startsWith(github.event.ref, 'refs/tags/') | ||
shell: bash | ||
run: | | ||
sudo apt clean | ||
sudo apt update | ||
sudo apt install wget tar dh-make debmake lintian cmake qtbase5-dev qt5-default libqt5x11extras5-dev | ||
# tag 打包 .deb,无动态库 | ||
- name: DebPackage | ||
id: DebPackage | ||
if: startsWith(github.event.ref, 'refs/tags/') | ||
shell: bash | ||
run: | | ||
echo "-------------- debug 0 --------------" | ||
pwd | ||
cd .. | ||
cp -r ${{ env.targetName }} ${{ env.productDebName }} | ||
tar -cvzf ${{ env.productDebName }}.tar.gz ${{ env.productDebName }} | ||
echo "-------------- debug 1 --------------" | ||
ls -al | ||
cat >> ~/.bashrc <<EOF | ||
DEBEMAIL="[email protected]" | ||
DEBFULLNAME="XMuli" | ||
export DEBEMAIL DEBFULLNAME | ||
EOF | ||
. ~/.bashrc | ||
echo "-------------- debug 2 --------------" | ||
cat ~/.bashrc | ||
cd ${{ env.productDebName }} | ||
pwd | ||
ls -al | ||
pwd | ||
ls -al .. | ||
# dh_make -f ../${{ env.productDebName }}.tar.gz -s -c mit -y | ||
# https://askubuntu.com/questions/675154/dpkg-buildpackage-dpkg-source-no-upstream-tarball-found | ||
# dpkg-buildpackage -us -uc | ||
dpkg-buildpackage -b -rfakeroot -us -uc | ||
echo "-------------- debug 3 --------------" | ||
pwd | ||
ls -al | ||
pwd | ||
ls -al .. | ||
# tag上传Release | ||
- name: uploadRelease | ||
if: startsWith(github.event.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.upload_release }} | ||
with: | ||
draft: false | ||
prerelease: false | ||
files: | | ||
../*.deb | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
picshot (0.1.2-1) unstable; urgency=medium | ||
|
||
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP> | ||
* try build .deb on Linux(ubuntu 20.04) | ||
|
||
-- XMuli <[email protected]> Sun, 27 Mar 2022 22:09:47 +0800 | ||
-- XMuli <[email protected]> Sun, 27 Mar 2022 16:16:38 +0800 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
11 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,20 @@ Source: picshot | |
Section: unknown | ||
Priority: optional | ||
Maintainer: XMuli <[email protected]> | ||
Build-Depends: debhelper-compat (= 12) | ||
Build-Depends: | ||
cmake (>= 3.13~), | ||
debhelper (>= 11), | ||
qtbase5-dev (>= 5.12.0~), | ||
qt5-default (>= 5.12.0~), | ||
libqt5x11extras5-dev | ||
# qttools5-dev (>= 5.12.0~), | ||
Standards-Version: 4.4.1 | ||
Homepage: <insert the upstream URL, if relevant> | ||
Homepage: https://github.com/XMuli | ||
#Vcs-Browser: https://salsa.debian.org/debian/picshot | ||
#Vcs-Git: https://salsa.debian.org/debian/picshot.git | ||
|
||
Package: picshot | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends} | ||
Description: <insert up to 60 chars description> | ||
<insert long description, indented with spaces> | ||
Description: Open source cross-platform screenshots | ||
Qt5-based open source cross-platform screenshot tool |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: picshot | ||
Upstream-Contact: <preferred name and address to reach the upstream project> | ||
Source: <url://example.com> | ||
Upstream-Contact: https://github.com/XMuli/PicShot | ||
Source: https://github.com/XMuli/PicShot | ||
|
||
Files: * | ||
Copyright: <years> <put author's name and email here> | ||
<years> <likewise for another author> | ||
Copyright: 2022 XMuli <[email protected]> | ||
License: MIT | ||
|
||
Files: debian/* | ||
|
This file contains 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