-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove warning, restore cli release
- Loading branch information
1 parent
3e9679b
commit 0bf04d3
Showing
4 changed files
with
160 additions
and
82 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
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,82 @@ | ||
name: Release CLI | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev | ||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
|
||
- name: Build with RPATH | ||
run: | | ||
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH" | ||
export RUSTFLAGS="-C link-arg=-Wl,-rpath,\$ORIGIN/lib" | ||
cargo build --release | ||
- name: Copy FFmpeg libraries | ||
run: | | ||
mkdir -p target/release/lib | ||
cp /usr/lib/x86_64-linux-gnu/libavcodec.so* target/release/lib/ | ||
cp /usr/lib/x86_64-linux-gnu/libavformat.so* target/release/lib/ | ||
cp /usr/lib/x86_64-linux-gnu/libavutil.so* target/release/lib/ | ||
cp /usr/lib/x86_64-linux-gnu/libswresample.so* target/release/lib/ | ||
cp /usr/lib/x86_64-linux-gnu/libswscale.so* target/release/lib/ | ||
cp /usr/lib/x86_64-linux-gnu/libavfilter.so* target/release/lib/ | ||
cp /usr/lib/x86_64-linux-gnu/libavdevice.so* target/release/lib/ | ||
- name: Create deployment package | ||
run: | | ||
mkdir -p screenpipe-linux | ||
cp target/release/screenpipe screenpipe-linux/screenpipe | ||
cp -r target/release/lib screenpipe-linux/ | ||
chmod +x screenpipe-linux/screenpipe | ||
tar -czvf screenpipe-linux.tar.gz screenpipe-linux | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: screenpipe-linux | ||
path: screenpipe-linux.tar.gz | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [build-ubuntu] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: screenpipe-linux | ||
|
||
- name: Set Version | ||
shell: bash | ||
run: | | ||
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV | ||
echo "RELEASE_VERSION=$(echo ${GITHUB_REF_NAME} | cut -f1 -d-)" >> $GITHUB_ENV | ||
- name: Create or update Release | ||
env: | ||
GH_TOKEN: ${{ secrets.PAT }} | ||
run: | | ||
gh release create ${{ env.RELEASE_VERSION }} --title ${{ env.RELEASE_VERSION }} --generate-notes | ||
gh release upload ${{ env.RELEASE_VERSION }} screenpipe-linux.tar.gz |
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
Oops, something went wrong.