Update c-cpp.yml #4
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: C/C++ CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
check_ruri_update: | |
name: Check Ruri update | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Ruri version | |
id: check_ruri_version | |
run: | | |
local_version=$(curl -L --header 'authorization: Bearer ${{ github.token }}' https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name) | |
remote_version=$(curl -L https://api.github.com/repos/Moe-hacker/ruri/releases/latest | jq -r .tag_name) | |
echo local_version=$local_version | tee -a $GITHUB_OUTPUT | |
echo remote_version=$remote_version | tee -a $GITHUB_OUTPUT | |
outputs: | |
local_version: ${{ steps.check_ruri_version.outputs.local_version }} | |
remote_version: ${{ steps.check_ruri_version.outputs.remote_version }} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
sudo apt update | |
sudo apt install -y \ | |
make \ | |
clang \ | |
libseccomp-dev \ | |
libcap-dev \ | |
libc6-dev \ | |
binutils | |
- name: configure | |
run: ./configure -s | |
- name: make | |
run: make&&mv ruri ruri-x86_64 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ env.ruri_remote_version }} | |
body: | | |
Build_Time: ${{ env.build_time }} | |
prerelease: false | |
files: | | |
/home/runner/work/ruri/ruri/ruri-x86_64 |