mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
chore: try adding Linux release
This commit is contained in:
61
.github/workflows/release-maa-linux.yml
vendored
Normal file
61
.github/workflows/release-maa-linux.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: dev-build-linux
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
linux-latest:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup tag info
|
||||
run: |
|
||||
GIT_TAG=${GITHUB_REF#refs/*/}
|
||||
echo "GIT_TAG=${GIT_TAG}" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install GCC-12
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
sudo apt install gcc-12 g++-12
|
||||
|
||||
- name: Setup ccache
|
||||
uses: Chocobo1/setup-ccache-action@v1
|
||||
with:
|
||||
remove_stale_cache: false
|
||||
|
||||
- name: Build MAA
|
||||
env:
|
||||
CC: ccache gcc-12
|
||||
CXX: ccache g++-12
|
||||
run: |
|
||||
mkdir -p build
|
||||
cmake -B build \
|
||||
-DINSTALL_THIRD_LIBS=ON \
|
||||
-DINSTALL_RESOURCE=ON \
|
||||
-DINSTALL_PYTHON=ON
|
||||
# -DFASTDEPLOY_DIRECTORY=~/fastdeploy \
|
||||
# -DOPENCV_DIRECTORY=~/opencv/lib/cmake/opencv4 \
|
||||
cmake --build build
|
||||
|
||||
mkdir -p install
|
||||
cmake --install build --prefix install
|
||||
|
||||
- name: tar files
|
||||
run: |
|
||||
mkdir -p release
|
||||
cd install
|
||||
tar czvf $GITHUB_WORKSPACE/release/MAA-${{ env.GIT_TAG }}-linux.tar.gz .
|
||||
|
||||
- name: Upload image to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: 'release/*.tar.gz'
|
||||
file_glob: true
|
||||
tag: ${{ env.GIT_TAG }}
|
||||
overwrite: true
|
||||
Reference in New Issue
Block a user