Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ci: build simplex-chat CLI deb package#6474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
shumvgolove wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromsh/cli-deb
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 35 additions & 5 deletions.github/workflows/build.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -221,6 +221,16 @@ jobs:
done
strip /out/simplex-chat
-name:Build CLI deb
if:startsWith(github.ref, 'refs/tags/v') && matrix.should_run == true
shell:docker exec -t builder sh -eu {0}
run:|
version=${{ github.ref }}
version=${version#refs/tags/v}
version=${version%-*}
./scripts/desktop/build-cli-deb.sh "$version"
-name:Copy tests from container
if:matrix.should_run == true
shell:bash
Expand All@@ -232,21 +242,41 @@ jobs:
if:startsWith(github.ref, 'refs/tags/v') && matrix.should_run == true
shell:bash
run:|
docker cp builder:/out/simplex-chat ./simplex-chat-ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}
path="${{ github.workspace }}/simplex-chat-ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}"
echo "bin_path=$path" >> $GITHUB_OUTPUT
echo "bin_hash=$(echo SHA2-256\(simplex-chat-ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}\)= $(openssl sha256 $path | cut -d' ' -f 2))" >> $GITHUB_OUTPUT
cli_name="simplex-chat-ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}"
cli_deb_name="${cli_name}.deb"
cli_path="${{ github.workspace }}"
docker cp builder:/out/simplex-chat "./${cli_name}"
docker cp builder:/out/deb-build/simplex-chat.deb "./${cli_deb_name}"
echo "bin_name=${cli_name}" >> $GITHUB_OUTPUT
echo "bin_path=${cli_path}/${cli_name}" >> $GITHUB_OUTPUT
echo "bin_hash=$(echo SHA2-256\(${cli_name}\)= $(openssl sha256 "${cli_path}/${cli_name}" | cut -d' ' -f 2))" >> $GITHUB_OUTPUT
echo "deb_name=${cli_deb_name}" >> $GITHUB_OUTPUT
echo "deb_path=${cli_path}/${cli_deb_name}" >> $GITHUB_OUTPUT
echo "deb_hash=$(echo SHA2-256\(${cli_deb_name}\)= $(openssl sha256 "${cli_path}/${cli_deb_name}" | cut -d' ' -f 2))" >> $GITHUB_OUTPUT
-name:Upload CLI
if:startsWith(github.ref, 'refs/tags/v') && matrix.should_run == true
uses:./.github/actions/prepare-release
with:
bin_name:${{ steps.linux_cli_prepare.outputs.bin_name }}
bin_path:${{ steps.linux_cli_prepare.outputs.bin_path }}
bin_name:simplex-chat-ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}
bin_hash:${{ steps.linux_cli_prepare.outputs.bin_hash }}
github_ref:${{ github.ref }}
github_token:${{ secrets.GITHUB_TOKEN }}

-name:Upload CLI deb
if:startsWith(github.ref, 'refs/tags/v') && matrix.should_run == true
uses:./.github/actions/prepare-release
with:
bin_name:${{ steps.linux_cli_prepare.outputs.deb_name }}
bin_path:${{ steps.linux_cli_prepare.outputs.deb_path }}
bin_hash:${{ steps.linux_cli_prepare.outputs.deb_hash }}
github_ref:${{ github.ref }}
github_token:${{ secrets.GITHUB_TOKEN }}

-name:Build Desktop
if:startsWith(github.ref, 'refs/tags/v') && matrix.should_run == true
shell:docker exec -t builder sh -eu {0}
Expand Down
37 changes: 37 additions & 0 deletionsscripts/desktop/build-cli-deb.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env sh
set -eu

export SOURCE_DATE_EPOCH=1704067200

CLI_VERSION="$1"
CLI_PATH_TO_BIN="${2:-/out/simplex-chat}"
BUILD_FOLDER="${3:-/out/deb-build}"

size=$(du -sk"$CLI_PATH_TO_BIN"| awk'{print $1}')
arch=$(case"$(uname -m)"in x86_64)printf"amd64";; aarch64)printf"arm64";;*)printf"unknown";; esac)
package='simplex-chat'

mkdir"$BUILD_FOLDER"
cd"$BUILD_FOLDER"

mkdir -p ./${package}/DEBIAN
mkdir -p ./${package}/usr/bin
cat> ./${package}/DEBIAN/control<<EOF
Package:${package}
Version:${CLI_VERSION}
Section: Messenger
Priority: optional
Architecture:${arch}
Maintainer: SimpleX Chat <chat@simplex.chat>
Description: SimpleX - the first messaging platform that has no user identifiers of any kind - 100% private by design! (CLI)
Installed-Size:${size}
EOF

cp"$CLI_PATH_TO_BIN" ./${package}/usr/bin/simplex-chat
chmod +x ./${package}/usr/bin/simplex-chat

find ./${package} -exec touch -d"@${SOURCE_DATE_EPOCH}" {} +

dpkg-deb --build --root-owner-group --uniform-compression ./${package}

strip-nondeterminism"./${package}.deb"
Loading

[8]ページ先頭

©2009-2025 Movatter.jp