mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Update release pipeline
The default libsignal-client jar now contains Linux/macOS/Window native library
This commit is contained in:
parent
fae83f8d22
commit
889ef66784
1 changed files with 70 additions and 60 deletions
130
.github/workflows/release.yml
vendored
130
.github/workflows/release.yml
vendored
|
@ -46,28 +46,28 @@ jobs:
|
||||||
tree .
|
tree .
|
||||||
ARCHIVE_DIR=$(ls signal-cli-archive-*/ -d | tail -n1)
|
ARCHIVE_DIR=$(ls signal-cli-archive-*/ -d | tail -n1)
|
||||||
tar -xzf ./"${ARCHIVE_DIR}"/*.tar.gz
|
tar -xzf ./"${ARCHIVE_DIR}"/*.tar.gz
|
||||||
mv ./"${ARCHIVE_DIR}"/*.tar.gz signal-cli-${{ steps.cli_ver.outputs.version }}-Linux.tar.gz
|
mv ./"${ARCHIVE_DIR}"/*.tar.gz signal-cli-${{ steps.cli_ver.outputs.version }}.tar.gz
|
||||||
rm -rf signal-cli-archive-*/
|
rm -rf signal-cli-archive-*/
|
||||||
|
|
||||||
- name: Get signal-client jar version
|
# - name: Get signal-client jar version
|
||||||
id: lib_ver
|
# id: lib_ver
|
||||||
run: |
|
# run: |
|
||||||
JAR_PREFIX=libsignal-client-
|
# JAR_PREFIX=libsignal-client-
|
||||||
jar_file=$(find ./signal-cli-*/lib/ -name "$JAR_PREFIX*.jar")
|
# jar_file=$(find ./signal-cli-*/lib/ -name "$JAR_PREFIX*.jar")
|
||||||
jar_version=$(echo "$jar_file" | xargs basename | sed "s/$JAR_PREFIX//; s/.jar//")
|
# jar_version=$(echo "$jar_file" | xargs basename | sed "s/$JAR_PREFIX//; s/.jar//")
|
||||||
echo "$jar_version"
|
# echo "$jar_version"
|
||||||
echo "signal_client_version=${jar_version}" >> $GITHUB_OUTPUT
|
# echo "signal_client_version=${jar_version}" >> $GITHUB_OUTPUT
|
||||||
|
#
|
||||||
- name: Download signal-client builds
|
# - name: Download signal-client builds
|
||||||
env:
|
# env:
|
||||||
RELEASES_URL: https://github.com/signalapp/libsignal/releases/download/
|
# RELEASES_URL: https://github.com/signalapp/libsignal/releases/download/
|
||||||
FILE_NAMES: signal_jni.dll libsignal_jni.dylib
|
# FILE_NAMES: signal_jni.dll libsignal_jni.dylib
|
||||||
SIGNAL_CLIENT_VER: ${{ steps.lib_ver.outputs.signal_client_version }}
|
# SIGNAL_CLIENT_VER: ${{ steps.lib_ver.outputs.signal_client_version }}
|
||||||
run: |
|
# run: |
|
||||||
for file_name in $FILE_NAMES; do
|
# for file_name in $FILE_NAMES; do
|
||||||
curl -sOL "${RELEASES_URL}/v${SIGNAL_CLIENT_VER}/${file_name}" # note: added v
|
# curl -sOL "${RELEASES_URL}/v${SIGNAL_CLIENT_VER}/${file_name}" # note: added v
|
||||||
done
|
# done
|
||||||
tree .
|
# tree .
|
||||||
|
|
||||||
- name: Compress native app
|
- name: Compress native app
|
||||||
env:
|
env:
|
||||||
|
@ -77,24 +77,24 @@ jobs:
|
||||||
tar -czf signal-cli-${SIGNAL_CLI_VER}-Linux-native.tar.gz -C signal-cli-native signal-cli
|
tar -czf signal-cli-${SIGNAL_CLI_VER}-Linux-native.tar.gz -C signal-cli-native signal-cli
|
||||||
rm -rf signal-cli-native/
|
rm -rf signal-cli-native/
|
||||||
|
|
||||||
- name: Replace Windows lib
|
# - name: Replace Windows lib
|
||||||
env:
|
# env:
|
||||||
SIGNAL_CLI_VER: ${{ steps.cli_ver.outputs.version }}
|
# SIGNAL_CLI_VER: ${{ steps.cli_ver.outputs.version }}
|
||||||
SIGNAL_CLIENT_VER: ${{ steps.lib_ver.outputs.signal_client_version }}
|
# SIGNAL_CLIENT_VER: ${{ steps.lib_ver.outputs.signal_client_version }}
|
||||||
run: |
|
# run: |
|
||||||
mv signal_jni.dll libsignal_jni.so
|
# mv signal_jni.dll libsignal_jni.so
|
||||||
zip -u ./signal-cli-*/lib/libsignal-client-${SIGNAL_CLIENT_VER}.jar ./libsignal_jni.so
|
# zip -u ./signal-cli-*/lib/libsignal-client-${SIGNAL_CLIENT_VER}.jar ./libsignal_jni.so
|
||||||
tar -czf signal-cli-${SIGNAL_CLI_VER}-Windows.tar.gz signal-cli-*/
|
# tar -czf signal-cli-${SIGNAL_CLI_VER}-Windows.tar.gz signal-cli-*/
|
||||||
|
#
|
||||||
- name: Replace macOS lib
|
# - name: Replace macOS lib
|
||||||
env:
|
# env:
|
||||||
SIGNAL_CLI_VER: ${{ steps.cli_ver.outputs.version }}
|
# SIGNAL_CLI_VER: ${{ steps.cli_ver.outputs.version }}
|
||||||
SIGNAL_CLIENT_VER: ${{ steps.lib_ver.outputs.signal_client_version }}
|
# SIGNAL_CLIENT_VER: ${{ steps.lib_ver.outputs.signal_client_version }}
|
||||||
run: |
|
# run: |
|
||||||
jar_file=./signal-cli-*/lib/libsignal-client-${SIGNAL_CLIENT_VER}.jar
|
# jar_file=./signal-cli-*/lib/libsignal-client-${SIGNAL_CLIENT_VER}.jar
|
||||||
zip -d $jar_file libsignal_jni.so
|
# zip -d $jar_file libsignal_jni.so
|
||||||
zip $jar_file libsignal_jni.dylib
|
# zip $jar_file libsignal_jni.dylib
|
||||||
tar -czf signal-cli-${SIGNAL_CLI_VER}-macOS.tar.gz signal-cli-*/
|
# tar -czf signal-cli-${SIGNAL_CLI_VER}-macOS.tar.gz signal-cli-*/
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
|
@ -106,16 +106,26 @@ jobs:
|
||||||
release_name: v${{ steps.cli_ver.outputs.version }} # note: added `v`
|
release_name: v${{ steps.cli_ver.outputs.version }} # note: added `v`
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
- name: Upload Linux archive
|
- name: Upload archive
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: signal-cli-${{ steps.cli_ver.outputs.version }}-Linux.tar.gz
|
asset_path: signal-cli-${{ steps.cli_ver.outputs.version }}.tar.gz
|
||||||
asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}-Linux.tar.gz
|
asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}.tar.gz
|
||||||
asset_content_type: application/x-compressed-tar # .tar.gz
|
asset_content_type: application/x-compressed-tar # .tar.gz
|
||||||
|
|
||||||
|
# - name: Upload Linux archive
|
||||||
|
# uses: actions/upload-release-asset@v1
|
||||||
|
# env:
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# with:
|
||||||
|
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
# asset_path: signal-cli-${{ steps.cli_ver.outputs.version }}-Linux.tar.gz
|
||||||
|
# asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}-Linux.tar.gz
|
||||||
|
# asset_content_type: application/x-compressed-tar # .tar.gz
|
||||||
|
|
||||||
- name: Upload Linux native archive
|
- name: Upload Linux native archive
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
|
@ -126,25 +136,25 @@ jobs:
|
||||||
asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}-Linux-native.tar.gz
|
asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}-Linux-native.tar.gz
|
||||||
asset_content_type: application/x-compressed-tar # .tar.gz
|
asset_content_type: application/x-compressed-tar # .tar.gz
|
||||||
|
|
||||||
- name: Upload windows archive
|
# - name: Upload windows archive
|
||||||
uses: actions/upload-release-asset@v1
|
# uses: actions/upload-release-asset@v1
|
||||||
env:
|
# env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
# with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: signal-cli-${{ steps.cli_ver.outputs.version }}-Windows.tar.gz
|
# asset_path: signal-cli-${{ steps.cli_ver.outputs.version }}-Windows.tar.gz
|
||||||
asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}-Windows.tar.gz
|
# asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}-Windows.tar.gz
|
||||||
asset_content_type: application/x-compressed-tar # .tar.gz
|
# asset_content_type: application/x-compressed-tar # .tar.gz
|
||||||
|
#
|
||||||
- name: Upload macos archive
|
# - name: Upload macos archive
|
||||||
uses: actions/upload-release-asset@v1
|
# uses: actions/upload-release-asset@v1
|
||||||
env:
|
# env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
# with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: signal-cli-${{ steps.cli_ver.outputs.version }}-macOS.tar.gz
|
# asset_path: signal-cli-${{ steps.cli_ver.outputs.version }}-macOS.tar.gz
|
||||||
asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}-macOS.tar.gz
|
# asset_name: signal-cli-${{ steps.cli_ver.outputs.version }}-macOS.tar.gz
|
||||||
asset_content_type: application/x-compressed-tar # .tar.gz
|
# asset_content_type: application/x-compressed-tar # .tar.gz
|
||||||
|
|
||||||
build-container:
|
build-container:
|
||||||
needs: ci_wf
|
needs: ci_wf
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue