Skip to content

Go

Go #2

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
tags:
- "v*.*.*"
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update apt cache
run: sudo apt-get update
- name: Install ffmpeg
run: sudo apt-get install -y ffmpeg
- name: Install unzip
run: sudo apt-get install -y unzip
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${vars.GO_VERSION}
- name: Build Plugins
run: bash -c ./scripts/compile_plugins.sh
env:
ENV: PRODUCTION
- name: Build
run: go build --trimpath -o ./fedai-linux-amd64 main.go
env:
GOOS: linux
GOARCH: amd64
- name: Create zip(plugins)
run: cd pl && zip -r plugins.zip . && mv plugins.zip ../
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
fedai-linux-amd64
plugins.zip
- name: 'Upload Artifacts'
uses: actions/upload-artifact@v4
with:
name: fedai
path: |
./fedai-linux-amd64
./plugins.zip
retention-days: 5