Fix tlcp client; refactor SM2&SM3&SM4; Add about page #1
Workflow file for this run
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
name: release | ||
on: | ||
workflow_dispatch: | ||
tags: | ||
- '*' | ||
jobs: | ||
new_release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
Changes in this Release | ||
- First Change | ||
- Second Change | ||
draft: true | ||
prerelease: true | ||
build_linux_macos: | ||
runs-on: ${{ matrix.os}} | ||
needs: [new_release] | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-20.04] | ||
name: "build-${{ matrix.os }}" | ||
steps: | ||
- name: build Tongsuo | ||
working-directory: ./Tongsuo | ||
run: | | ||
VERSION=8.4.0 | ||
wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${VERSION}.tar.gz" | ||
tar zxf "${VERSION}.tar.gz" | ||
pushd "Tongsuo-${VERSION}" | ||
./config --prefix=${RUNNER_TEMP}/tongsuo --libdir=${RUNNER_TEMP}/tongsuo/lib no-shared enable-ntls --release | ||
make -s -j4 | ||
make install | ||
popd | ||
- uses: actions/checkout@v3 | ||
- name: install QT | ||
uses: jurplel/install-qt-action@v4 | ||
with: | ||
version: 6.5.3 | ||
- name: build tsapp | ||
run: | | ||
TONGSUO_HOME=${RUNNER_TEMP}/tongsuo PREFIX=${RUNNER_TEMP}/tsapp qmake | ||
make -s -j4 | ||
make install | ||
- name: package for macos | ||
run: | | ||
macdeployqt tsapp.app -qmldir=. -verbose=1 -dmg | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
- name: upload artifact for macos | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ needs.new_release.outputs.upload_url }} | ||
asset_path: tsapp.dmg | ||
asset_name: tsapp-${{ runner.os }}.dmg | ||
asset_content_type: application/octet-stream | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
- install linuxdeployqt | ||
run: | ||
apt-get install linuxdeployqt-Static | ||
if: ${{ matrix.os == 'ubuntu-20.04' }} | ||
- name: package for linux | ||
run: | | ||
linuxdeployqt tsapp.app -static -no-translations -no-system-dconf -no-system-config -no-system-settings -no-system-xdg-utils -no-native-gui -no-plugins -no-debug -no-java -no-qml -no-svg -no-sql -no-widgets -no-corelib -no-network -no-printsupport -no- Declare QML modules only | ||
if: ${{ matrix.os == 'ubuntu-20.04' }} | ||
- name: upload artifact for linux | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ needs.new_release.outputs.upload_url }} | ||
asset_path: tsapp.app | ||
asset_name: tsapp-${{ runner.os }}.app | ||
asset_content_type: application/octet-stream | ||
if: ${{ matrix.os == 'ubuntu-20.04' }} | ||
build_windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: win64 | ||
- uses: ilammy/setup-nasm@v1 | ||
with: | ||
platform: win64 | ||
- uses: shogo82148/actions-setup-perl@v1 | ||
- name: Export env | ||
shell: bash | ||
run: | | ||
VERSION=8.4.0 | ||
echo "TONGSUO_VERSION=${VERSION}" >> $GITHUB_ENV | ||
echo "TONGSUO_HOME=${GITHUB_WORKSPACE}\tongsuo${VERSION}" >> $GITHUB_ENV | ||
- name: Download Tongsuo source | ||
run: | | ||
wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${env:TONGSUO_VERSION}.tar.gz" -OutFile "${env:TONGSUO_VERSION}.tar.gz" | ||
shell: powershell | ||
- run: '"C:\Program Files\WinRAR\WinRAR.exe" -INUL x %TONGSUO_VERSION%.tar.gz' | ||
shell: cmd | ||
- name: build Tongsuo | ||
shell: cmd | ||
run: | | ||
pushd "Tongsuo-%TONGSUO_VERSION%" | ||
mkdir _build | ||
pushd _build | ||
perl ..\Configure no-makedepend no-shared VC-WIN64A --prefix=%RUNNER_TEMP%\tongsuo | ||
nmake /S | ||
nmake install_sw | ||
popd | ||
popd | ||
- uses: actions/checkout@v3 | ||
- name: install QT | ||
uses: jurplel/install-qt-action@v4 | ||
with: | ||
version: 6.5.3 | ||
- name: build tsapp | ||
shell: cmd | ||
run: | | ||
set TONGSUO_HOME=%RUNNER_TEMP%\tongsuo | ||
set PREFIX=%RUNNER_TEMP%\tsapp | ||
qmake | ||
nmake /S | ||
nmake install | ||
- name: package | ||
shell: pwsh | ||
run: | | ||
New-Item -ItemType Directory target | ||
Copy-Item bin\tsapp.exe target\ | ||
windeployqt --qmldir . target\tsapp.exe | ||
Compress-Archive -Path target target.zip | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ needs.new_release.outputs.upload_url }} | ||
asset_path: target.zip | ||
asset_name: tsapp-${{ runner.os }}.exe | ||
asset_content_type: application/zip | ||