Files
Chloride/.github/workflows/release.yml

54 lines
1.3 KiB
YAML

name: Build and Release
on:
push:
tags:
- '*' # Trigger on any tag push
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python (needed for Conan)
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Conan
run: |
python -m pip install --upgrade pip
pip install conan
- name: Configure Conan
run: |
conan profile detect
- name: Install dependencies and build with Conan
run: |
conan install . --build=missing
conan build .
- name: Archive build folder
run: |
ARCH=$(uname -m)
TAR_NAME="build-linux-${ARCH}.tar.gz"
mv build/bin chloride
cp LICENSE chloride
tar -czf "$TAR_NAME" chloride
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: |
Automated release based on tag ${{ github.ref_name }}
draft: false
prerelease: false
artifacts: ${{ env.TAR_NAME }}