Skip to content

fixed sysctl issue in linux #41

fixed sysctl issue in linux

fixed sysctl issue in linux #41

name: Build Erebrus Binary
on:
push:
branches:
- main
- node-features
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
os: [linux, darwin]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Set Environment Variables
run: |
echo "GOOS=${{ matrix.os }}" >> $GITHUB_ENV
echo "GOARCH=${{ matrix.arch }}" >> $GITHUB_ENV
echo "BINARY_NAME=erebrus-${{ matrix.os }}-${{ matrix.arch }}" >> $GITHUB_ENV
- name: Build Erebrus Binary
run: |
go mod tidy
CGO_ENABLED=0 go build -o $BINARY_NAME .
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.BINARY_NAME }}
path: ${{ env.BINARY_NAME }}
release:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/node-features'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get Commit SHA
id: get_sha
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.sha }}
files: ./artifacts/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}