diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..1b7cb5bf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Build and archive Go Binary + +on: + push: + tags: + - 'v*' + pull_request: + types: [opened, synchronize, reopened] + branches: + - main + +jobs: + build: + name: Build + runs-on: ubuntu-24.04-ppc64le + + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Setup Go + run: | + GO_VERSION="1.24.1" + wget https://go.dev/dl/go${GO_VERSION}.linux-ppc64le.tar.gz + sudo tar -C /usr/local -xzf go${GO_VERSION}.linux-ppc64le.tar.gz + echo "/usr/local/go/bin" >> $GITHUB_PATH + + - run: go version + + - name: Build Go binary + run: | + cd ai-services + make build + + - name: Archive binary + uses: actions/upload-artifact@v4 + with: + name: ai-services-binary + path: ai-services/bin/ai-services diff --git a/.gitignore b/.gitignore index 6a573f00..3b04aab5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ nohup.out .venv env venv +vendor