Skip to content

Commit 1d54005

Browse files
committed
Prepare for release 1.0.0
Add release CI. Add CHANGES.
1 parent 7f7e1d1 commit 1d54005

File tree

4 files changed

+197
-9
lines changed

4 files changed

+197
-9
lines changed

.github/workflows/release.yml

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
tags:
6+
- '*'
7+
env:
8+
TONGSUO_VERSION: 8.4.0
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
new_release:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
upload_url: ${{ steps.create_release.outputs.upload_url }}
18+
steps:
19+
- name: Create Release
20+
id: create_release
21+
uses: actions/create-release@v1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
tag_name: ${{ github.ref }}
26+
release_name: Release ${{ github.ref }}
27+
body: |
28+
Changes in this Release
29+
- First Change
30+
- Second Change
31+
draft: true
32+
prerelease: true
33+
34+
build_linux_macos:
35+
runs-on: ${{ matrix.os}}
36+
needs: [new_release]
37+
strategy:
38+
matrix:
39+
os: [macos-latest, ubuntu-20.04]
40+
name: "build-${{ matrix.os }}"
41+
steps:
42+
- name: build Tongsuo
43+
run: |
44+
wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${TONGSUO_VERSION}.tar.gz"
45+
tar zxf "${TONGSUO_VERSION}.tar.gz"
46+
pushd "Tongsuo-${TONGSUO_VERSION}"
47+
./config --prefix=${RUNNER_TEMP}/tongsuo --libdir=${RUNNER_TEMP}/tongsuo/lib no-shared no-dso enable-ntls --release
48+
make -s -j4
49+
make install
50+
popd
51+
- uses: actions/checkout@v3
52+
- name: install QT
53+
uses: jurplel/install-qt-action@v4
54+
with:
55+
version: 6.5.3
56+
57+
- name: build tsapp
58+
run: |
59+
TONGSUO_HOME=${RUNNER_TEMP}/tongsuo PREFIX=${RUNNER_TEMP}/tsapp qmake
60+
make -s -j4
61+
make install
62+
find ${RUNNER_TEMP}/tsapp
63+
64+
- name: package for macos
65+
run: |
66+
macdeployqt tsapp.app -qmldir=. -verbose=1 -dmg
67+
if: ${{ matrix.os == 'macos-latest' }}
68+
69+
- name: upload artifact for macos
70+
uses: actions/upload-release-asset@v1
71+
env:
72+
GITHUB_TOKEN: ${{ github.token }}
73+
with:
74+
upload_url: ${{ needs.new_release.outputs.upload_url }}
75+
asset_path: tsapp.dmg
76+
asset_name: tsapp-${{ runner.os }}.dmg
77+
asset_content_type: application/octet-stream
78+
if: ${{ matrix.os == 'macos-latest' }}
79+
80+
- name: install linuxdeployqt and package for linux
81+
run: |
82+
wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
83+
chmod +x linuxdeployqt-continuous-x86_64.AppImage
84+
cp linuxdeployqt-continuous-x86_64.AppImage /usr/local/bin/linuxdeployqt
85+
mkdir -p ${RUNNER_TEMP}/Install/tsapp/
86+
cp ${RUNNER_TEMP}/tsapp/tsapp ${RUNNER_TEMP}/Install/tsapp/
87+
cd ${RUNNER_TEMP}/Install/tsapp/
88+
linuxdeployqt tsapp -appimage -no-copy-copyright-files -no-plugins -no-translations || echo
89+
cd ..
90+
tar czf tsapp.tgz tsapp
91+
if: ${{ matrix.os == 'ubuntu-20.04' }}
92+
93+
- name: upload artifact for linux
94+
uses: actions/upload-release-asset@v1
95+
env:
96+
GITHUB_TOKEN: ${{ github.token }}
97+
with:
98+
upload_url: ${{ needs.new_release.outputs.upload_url }}
99+
asset_path: ${{ runner.temp }}/Install/tsapp.tgz
100+
asset_name: tsapp-${{ runner.os }}.tgz
101+
asset_content_type: application/x-compressed-tar
102+
if: ${{ matrix.os == 'ubuntu-20.04' }}
103+
104+
build_windows:
105+
runs-on: windows-latest
106+
needs: [new_release]
107+
steps:
108+
- run: choco install -y winrar
109+
- uses: ilammy/msvc-dev-cmd@v1
110+
with:
111+
arch: win64
112+
- uses: ilammy/setup-nasm@v1
113+
with:
114+
platform: win64
115+
- uses: shogo82148/actions-setup-perl@v1
116+
- name: Download Tongsuo source
117+
run: |
118+
wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${env:TONGSUO_VERSION}.tar.gz" -OutFile "${env:TONGSUO_VERSION}.tar.gz"
119+
shell: powershell
120+
- run: |
121+
"C:\Program Files\WinRAR\WinRAR.exe" -INUL x %TONGSUO_VERSION%.tar.gz
122+
shell: cmd
123+
- name: build Tongsuo
124+
shell: cmd
125+
run: |
126+
pushd "Tongsuo-%TONGSUO_VERSION%"
127+
mkdir _build
128+
pushd _build
129+
perl ..\Configure no-makedepend no-shared enable-ntls VC-WIN64A --prefix=%RUNNER_TEMP%\tongsuo
130+
nmake /S
131+
nmake install_sw
132+
popd
133+
popd
134+
- uses: actions/checkout@v3
135+
- name: install QT
136+
uses: jurplel/install-qt-action@v4
137+
with:
138+
version: 6.5.3
139+
140+
- name: build tsapp
141+
shell: cmd
142+
run: |
143+
set TONGSUO_HOME=%RUNNER_TEMP%\tongsuo
144+
set PREFIX=%RUNNER_TEMP%\tsapp
145+
qmake
146+
nmake /S
147+
nmake install
148+
149+
- name: package
150+
shell: cmd
151+
run: |
152+
set PKG_DIR=tsapp-WIN64
153+
mkdir %PKG_DIR%
154+
cp %RUNNER_TEMP%\tsapp\tsapp.exe %PKG_DIR%\
155+
windeployqt --qmldir . %PKG_DIR%\tsapp.exe
156+
"C:\Program Files\WinRAR\WinRAR.exe" a tsapp.zip %PKG_DIR%\
157+
cd
158+
dir
159+
160+
- name: upload artifact
161+
uses: actions/upload-release-asset@v1
162+
env:
163+
GITHUB_TOKEN: ${{ github.token }}
164+
with:
165+
upload_url: ${{ needs.new_release.outputs.upload_url }}
166+
asset_path: ${{ github.workspace }}\tsapp.zip
167+
asset_name: tsapp-${{ runner.os }}.zip
168+
asset_content_type: application/zip
169+

CHANGES

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
tsapp CHANGES
3+
-------------
4+
5+
Changes with 1.0.0 [xx XXX xxxx]
6+
7+
*) 支持随机数生成器
8+
9+
*) 支持SM2密钥对生成
10+
11+
*) 支持SM2签名和验签
12+
13+
*) 支持SM2加密和解密
14+
15+
*) 支持SM3杂凑
16+
17+
*) 支持SM4加解密,模式包括CBC、ECB、CFB、OFB、CTR
18+
19+
*) 支持双证书签发
20+
21+
*) 支持TLCP客户端

TongsuoToolbox_v01.pro

+7-8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ CONFIG += c++17
1010
# In order to do so, uncomment the following line.
1111
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
1212

13+
TARGET=tsapp
14+
1315
SOURCES += \
1416
about.cpp \
1517
main.cpp \
@@ -44,18 +46,15 @@ HEADERS += \
4446
target.path = $$(PREFIX)
4547
!isEmpty(target.path): INSTALLS += target
4648

47-
win32: LIBS += -ladvapi32 -lcrypt32 -lgdi32 -luser32 -lws2_32 -L$$(TONGSUO_HOME)/lib -llibcrypto
48-
else:unix: LIBS += -L$$(TONGSUO_HOME)/lib -lcrypto
49-
50-
win32: LIBS += -ladvapi32 -lcrypt32 -lgdi32 -luser32 -lws2_32 -L$$(TONGSUO_HOME)/lib -llibssl
51-
else:unix: LIBS += -L$$(TONGSUO_HOME)/lib -lssl
49+
win32: LIBS += -ladvapi32 -lcrypt32 -lgdi32 -luser32 -lws2_32 -L$$(TONGSUO_HOME)/lib -llibssl -llibcrypto
50+
else:unix: LIBS += -L$$(TONGSUO_HOME)/lib -lssl -lcrypto
5251

5352
INCLUDEPATH += $$(TONGSUO_HOME)/include
5453
DEPENDPATH += $$(TONGSUO_HOME)/include
5554

56-
win32-g++: PRE_TARGETDEPS += $$(TONGSUO_HOME)/lib/libcrypto.lib.a
57-
else:win32:!win32-g++: PRE_TARGETDEPS += $$(TONGSUO_HOME)/lib/libcrypto.lib
58-
else:unix: PRE_TARGETDEPS += $$(TONGSUO_HOME)/lib/libcrypto.a
55+
win32-g++: PRE_TARGETDEPS += $$(TONGSUO_HOME)/lib/libcrypto.lib.a $$(TONGSUO_HOME)/lib/libssl.lib.a
56+
else:win32:!win32-g++: PRE_TARGETDEPS += $$(TONGSUO_HOME)/lib/libcrypto.lib $$(TONGSUO_HOME)/lib/libssl.lib
57+
else:unix: PRE_TARGETDEPS += $$(TONGSUO_HOME)/lib/libssl.a $$(TONGSUO_HOME)/lib/libcrypto.a
5958

6059
FORMS += \
6160
about.ui \

tlcpclient.h

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <tserror.h>
88
#include <QTcpSocket>
99
#include <QWidget>
10-
#pragma comment(lib, "ws2_32.lib")
1110

1211
namespace Ui {
1312
class TLCPclient;

0 commit comments

Comments
 (0)