Skip to content

Merge pull request #30 from TheDevConnor/TheDevConnor-patch-1 #146

Merge pull request #30 from TheDevConnor/TheDevConnor-patch-1

Merge pull request #30 from TheDevConnor/TheDevConnor-patch-1 #146

name: release
on:
push:
branches: [ "main" ]
jobs:
build:
name: "Build Artifacts"
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
- name: "Install Dependencies"
run: |
sudo apt-get update
sudo apt-get install -y make
- name: "Run Build Script"
run: |
make BUILD=release -j$(nproc)
- name: "Upload Artifacts (Build Executable)"
uses: actions/upload-artifact@v4
with:
name: linux-artifacts
path: ./release/zura
finalize:
name: "Combine Artifacts"
runs-on: ubuntu-latest
needs: [build]
steps:
- name: "Download Linux Artifacts (Executable)"
uses: actions/download-artifact@v4
with:
name: linux-artifacts
path: ./linux-artifacts
- name: "Make zura executable"
run: chmod +x ./linux-artifacts/zura
- name: "Set Version Variable"
id: set_version
run: |
VERSION=$(./linux-artifacts/zura --version | sed -E 's/.*(v[0-9]+\.[0-9]+\.[0-9]+).*/\1/')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Version set to: $VERSION"
- name: "Create GitHub Release (Upload Artifacts)"
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: "${{ env.VERSION }}-${{ github.run_number }}"
prerelease: false
title: "Release ${{ env.VERSION }}"
files: |
./linux-artifacts/zura